1. Get ID/hWnd for active window

How can I get win32lib ID or hWnd of the current active
Window (real Window: create(Window, ...))
                            ¯¯¯¯¯¯
Because it is needed for some API functions like
OpenClipboard(hWnd)

In VB we can use Me.hWnd variable.

Thanks!

new topic     » topic index » view message » categorize

2. Re: Get ID/hWnd for active window

> How can I get win32lib ID or hWnd of the current active
> Window (real Window: create(Window, ...))
                            ¯¯¯¯¯¯
> Because it is needed for some API functions like
> OpenClipboard(hWnd)

If you don't know which window is active :

constant
xGetForegroundWindow = registerw32Function(user32, "GetForegroundWindow", {},
C_INT )

global function getForegroundWindow ()
   return getId(w32Func(xGetForegroundWindow, {}) )
end function

    -- Martin

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu