Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get parent window handle
#1
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
#2
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)
#3
Many thanks, indeed.
#4
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,
#5
Macro
Code:
Copy      Help
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
#6
Dear Gintaras,

Much obliged. My mistake was that I was trying a.Focus(0).

Regards


Forum Jump:


Users browsing this thread: 1 Guest(s)