Is _WINDOWHANDLE working properly?
#8
@Dav Can you give this a quick test and tell me what values it reports for you, for those handles?

Code: (Select All)
 w& = _WindowHandle
Type RECTAPI
    left As Long
    top As Long
    right As Long
    bottom As Long
End Type

Dim apirect As RECTAPI

Declare Dynamic Library "user32"
    'https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclientrect
    Function GetClientRect% (ByVal hWnd As Long, lpRect As RECTAPI)
End Declare


Screen _NewImage(800, 600, 32) ' results the same no matter what size screen is used??

'Do: _Limit 10: Loop Until _ScreenExists 'this doesn't do it for me
_Delay .25 'this does works for me
w1& = _WindowHandle
tmp = GetClientRect(_WindowHandle, apirect)

Print apirect.left
Print apirect.top
Print apirect.right
Print apirect.bottom

Print w&, w1&

Do you get the same value, or two different ones when running this?

And question 2: Are you on the latest version of Qb64PE?
Reply


Messages In This Thread
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 08:53 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 09:37 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-17-2023, 10:09 PM
RE: Is _WINDOWHANDLE working properly? - by SMcNeill - 08-18-2023, 11:54 AM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 01:14 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 03:29 PM
RE: Is _WINDOWHANDLE working properly? - by Dav - 08-18-2023, 04:47 PM



Users browsing this thread: 5 Guest(s)