Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_WINDOWHANDLE
#6
Now I get it - I can't run your code at the moment but I'm assuming the difference is in the reported size of the window, correct?

Your issue is not the `_WINDOWHANDLE` changing, it's the size of the window changing. Basically, `SCREEN` does not currently wait for the window to change in size before continuing in your code, instead it queues that up to happen on the next window refresh (60 FPS). When you call `GetWindowRect()` with no delay, the screen is still the old size. You should be able to test this by placing the `HWND = _WINDOWHANDLE` before the `_Delay`.

We've talked about potentially changing `SCREEN` to wait for the resize, but in most cases this distinction doesn't matter because the program doesn't notice it - I don't believe there are any commands that return the current window height/width, commands like `_WIDTH` and `_HEIGHT` return the size of the current QB64 SCREEN regardless of the actual size of the window. You're skipping this by going to Windows with the `_WINDOWHANDLE` though and thus can notice the delay.
Reply


Messages In This Thread
_WINDOWHANDLE - by TerryRitchie - 06-05-2024, 09:57 PM
RE: _WINDOWHANDLE - by SMcNeill - 06-05-2024, 10:11 PM
RE: _WINDOWHANDLE - by DSMan195276 - 06-05-2024, 10:26 PM
RE: _WINDOWHANDLE - by TerryRitchie - 06-05-2024, 11:21 PM
RE: _WINDOWHANDLE - by SMcNeill - 06-05-2024, 11:33 PM
RE: _WINDOWHANDLE - by DSMan195276 - 06-05-2024, 11:41 PM
RE: _WINDOWHANDLE - by TerryRitchie - 06-06-2024, 12:42 AM
RE: _WINDOWHANDLE - by DSMan195276 - 06-06-2024, 01:44 AM
RE: _WINDOWHANDLE - by TerryRitchie - 06-06-2024, 06:04 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)