08-18-2023, 07:35 PM
Since I've started diving into API calls I figured a dedicated thread for API related questions would be better.
Here is my first question.
In the Wiki here: https://qb64phoenix.com/qb64wiki/index.p...ndow_Focus
It's shown how to determine the foreground window (the one in focus).
The Microsoft docs for GetForegroundWindow are located here: https://learn.microsoft.com/en-us/window...oundwindow
I noticed in the Wiki example that GetForegroundWindow is declared as an _OFFSET (%&). How was this determined? Looking at the Microsoft docs there is no indication of the type of variable returned. With other window handle (hWnd) related functions I've noticed a variable type of LONG is used. Why was _OFFSET needed here instead of LONG?
This has me confused. Any clarification would be greatly appreciated.
Here is my first question.
In the Wiki here: https://qb64phoenix.com/qb64wiki/index.p...ndow_Focus
It's shown how to determine the foreground window (the one in focus).
The Microsoft docs for GetForegroundWindow are located here: https://learn.microsoft.com/en-us/window...oundwindow
I noticed in the Wiki example that GetForegroundWindow is declared as an _OFFSET (%&). How was this determined? Looking at the Microsoft docs there is no indication of the type of variable returned. With other window handle (hWnd) related functions I've noticed a variable type of LONG is used. Why was _OFFSET needed here instead of LONG?
This has me confused. Any clarification would be greatly appreciated.