delphi - Get foreground CHILD window -


whenever skype in default view, tconversationwindow's become children of tskmainform window.

i having problems finding out tconversationwindow active - it's not mdi interface - one tconversationwindow visible, if tab/page.

when getforegroundwindow, skype's mainform handle returned (tskmainform). there way can foreground tconversationwindow within skype?

this question of mine has screenshots of skype's default view, if need it. :)

edit: here screenshot of winspector hierachy:

enter image description here

edit2: tried going thru windows this:

procedure tform1.button1click(sender: tobject);   function getclassname(handle: hwnd): string;   var   buffer: array[0..max_path] of char;   begin   windows.getclassname(handle, @buffer, max_path);   result := string(buffer);   end; var  wnd: hwnd;  skypewnd: hwnd; begin  skypewnd := findwindow('tskmainform',nil);   wnd := gettopwindow(skypewnd);   while (getclassname(wnd) <> 'tconversationform') , (wnd <> 0) , (not iswindowvisible(wnd))  begin    wnd := getnextwindow(wnd,gw_hwndnext);  end;   label1.caption := getclassname(wnd)+' - '+gethandletext(wnd);  end; 

the above supposed find visible window, when debug it, never enters begin end within while loop, , label1 displays "tchromemenu - chrometoolbar". when remove iswindowvisible check, atleast finds tconversationform. doing wrong?

edit3: placing iswindowvisible , getclassname check inside loop, , break when true, managed it. :)

by placing iswindowvisible , getclassname check inside loop, , break when true, managed it. :)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -