Anyway, I'd like WindowHeight (and WindowWidth too) to be able to return
the ACTUAL height/width, instead of the INNER height/width, because at the
moment WindowHeight() and WindowWidth() don't take border and caption
sizes into account, which is a bit silly. Makes it harder to dock a window on
the Taskbar or in a screen corner.

I'd suggest the commands return the real (borders and caption) size, but
with an optional flag like #PB_Window_InnerOnly to return just the client
size if the user wants it.
Code: Select all
Procedure RealWindowWidth(num)
GetWindowRect_(WindowID(num),win.RECT)
ProcedureReturn win\right-win\left
EndProcedure
Procedure RealWindowHeight(num)
GetWindowRect_(WindowID(num),win.RECT)
ProcedureReturn win\bottom-win\top
EndProcedure
OpenWindow(0,100,100,200,200,"test",#PB_Window_SystemMenu)
Debug WindowWidth(0) ; Returns 200 (just the inner width).
Debug WindowHeight(0) ; Returns 200 (just the inner height).
Debug RealWindowWidth(0) ; Returns 206 (width with borders).
Debug RealWindowHeight(0) ; Returns 230 (height with borders + caption).
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow