WindowX() offset with #PB_Window_SizeGadget

Just starting out? Need help? Post your questions and find answers here.
dige
Addict
Addict
Posts: 1417
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

WindowX() offset with #PB_Window_SizeGadget

Post by dige »

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.

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
What's the reason for this?
"Daddy, I'll run faster, then it is not so far..."
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: WindowX() offset with #PB_Window_SizeGadget

Post by BarryG »

dige
Addict
Addict
Posts: 1417
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: WindowX() offset with #PB_Window_SizeGadget

Post by dige »

Ok, thanks for the hint. Once again I thought I was the first one on the moon :oops:
"Daddy, I'll run faster, then it is not so far..."
Post Reply