Hi,
My application window is in the foreground. How can I get a window handle located under my window ?
Hi,
My application window is in the foreground. How can I get a window handle located under my window ?
function Main()
local oWnd
DEFINE WINDOW oWnd FROM 100,100 TO 400,400 PIXEL TITLE "First Window"
@ 20,20 BUTTON "New Window" SIZE 200,50 PIXEL OF oWnd ;
ACTION ( CreateNextWindow( oWnd ), oWnd:GoTop() )
ACTIVATE WINDOW oWnd
return nil
function CreateNextWindow( oMain )
local oWnd
DEFINE WINDOW oWnd FROM 200,200 TO 500,500 PIXEL OF oMain
ACTIVATE WINDOW oWnd
return nilBringWindowToTop( hWnd )Rao, thank you for your reply. But I didn 't understand how it would help me ? There is a window of someone else's application under my window and I need to get a window handle of this someone else's application. In this case, using the FindWindow() function is not possible
HB_FUNC (GETNEXTWINDOW)
{
  HWND hWnd   = (HWND) HMG_parnl (1);
  HWND hWndNext = GetWindow (hWnd, GW_HWNDNEXT);
  HMG_retnl ((LONG_PTR) hWndNext );
}GW_HWNDNEXT 2 Returns a handle to the window below the given window.
GW_HWNDPREV 3 Returns a handle to the window above the given window.
Yes, I understand. Rao, Jimmy thank you !
But I didn 't understand how it would help me ?
GetWindow( hWnd, 2 or 3 )