Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scroll to focused item on Windows Explorer left pane
#1
Supposed that a folder is selected/focused on Windows Explorer left pane (child id 100). The following macro moves the mouse pointer to this item. No problem up to now. The question rises when - for some reason - the item is not visible, although focused. How should I scroll to it? I understand that SendMessage with LVM_ENSUREVISIBLE does not work in this case inasmuch it is an outline object. Any advice is welcome.

Function tempf10
Code:
Copy      Help
int w=win("" "ExploreWClass")
int c=id(100 w) ;;outline
act c
Acc a=acc()
a.Mouse(0)
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
#2
Macro Macro2503
Code:
Copy      Help
;int w=win("" "ExploreWClass")
int w=win("" "CabinetWClass")
int c=id(100 w) ;;outline
act c
;Acc a=acc()
;a.Mouse(0)
;a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)

int htvi=SendMessage(c TVM_GETNEXTITEM TVGN_CARET 0)
SendMessage(c TVM_ENSUREVISIBLE 0 htvi)
#3
Many thanks indeed for an excellent advice. Best regards!


Forum Jump:


Users browsing this thread: 1 Guest(s)