Posts: 1,058
Threads: 367
Joined: Oct 2007
I am wondering whether there exists a way to find the window which opened current window. Example : Using OE you may open, using Save As, a save as window. Is it possible using the "Save As" window handle to find the OE window handle. I understand one less smart way is to use GetWindowList and obtain through it the OE window handle.
Thanks in advance
Posts: 12,097
Threads: 142
Joined: Dec 2002
If window2 is owned by window1, get owner window handle. It is in window actions dialog in floating toolbar.
int window1=GetWindow(window2 GW_OWNER)
Posts: 1,058
Threads: 367
Joined: Oct 2007
Posts: 1,058
Threads: 367
Joined: Oct 2007
Dear Gintaras,
Let me extend my previous enquiry as it follows :
Suppose that in Outlook Express (Outlook Express Message List -ATL:SysListView32) I select a message and press Save As. The Save as window appears and consequently the message line in ATL:SysListView32 is now dimmed. Is it possible to get the previously focused (now dimmed) item in the parent OE Message list control?
Thanks in advance,
Posts: 12,097
Threads: 142
Joined: Dec 2002
Macro
int w1=win("Save Message As" "#32770")
int w2=GetWindow(w1 GW_OWNER)
Acc a=acc("" "LIST" w2 "ATL:SysListView32" "" 0x1000) ;;XP
;Acc a=acc("" "LIST" w2 "SysListView32" "" 0x1000) ;;Vista
a.Selection
out a.Name
Posts: 1,058
Threads: 367
Joined: Oct 2007
Dear Gintaras,
Much obliged. My mistake was that I was trying a.Focus(0).
Regards