Posts: 1,058
Threads: 367
Joined: Oct 2007
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
int w=win("" "ExploreWClass")
int c=id(100 w) ;;outline
act c
Acc a=acc()
a.Mouse(0)
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
Posts: 12,147
Threads: 143
Joined: Dec 2002
Macro
Macro2503
;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)
Posts: 1,058
Threads: 367
Joined: Oct 2007
Many thanks indeed for an excellent advice. Best regards!