WindowX() offset with #PB_Window_SizeGadget
Posted: Thu May 02, 2024 10:08 am
I wanted to place a splash screen exactly over the main window and had an offset of approx. 8 pixels.
If the main window was created with the style #PB_Window_SizeGadget, then the value determined with WindowX(main window) is different than without.
What's the reason for this?
If the main window was created with the style #PB_Window_SizeGadget, then the value determined with WindowX(main window) is different than without.
Code: Select all
#hWnd = 0
OpenWindow(0, 200, 400, 500, 400, "Main Window", #PB_Window_SystemMenu|#PB_Window_SizeGadget)
OpenWindow(1, WindowX(#hWnd), WindowY(#hwnd) + 30, WindowWidth(#hWnd), WindowHeight(#hWnd), "#PB_Window_SystemMenu", #PB_Window_SystemMenu, WindowID(#hWnd))
OpenWindow(2, WindowX(#hWnd), WindowY(#hwnd) + 60, WindowWidth(#hWnd), WindowHeight(#hWnd), "#PB_Window_BorderLess", #PB_Window_BorderLess, WindowID(#hWnd))
OpenWindow(3, WindowX(#hWnd), WindowY(#hwnd) + 90, WindowWidth(#hWnd), WindowHeight(#hWnd), "#PB_Window_SizeGadget", #PB_Window_SizeGadget, WindowID(#hWnd))
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow