Posted by: Ifo
Hi Stefaan,
this issue is due to titlebar size - XP has a little
bigger titlebar. Older Team developer versions calculate
fixed title size and wrongly calculate window size.
We tested TD2005 - worked fine. With TD1.5.1 (that we
currently use) we added adjusting code to SAM_Create
section of every window. Exactly said, adjustation is
made in our derived classes.
HTH
Ifo, tangram software, Slovakia
--------------- Example ------------------
! Place this call in every window or their base class
Code: Select all
On SAM_Create
Call WindowHeightAdjust( hWndForm )
....
Constants:
Number: SM_CYCAPTION = 4
....
Internal Functions:
Function: WindowHeightAdjust
Returns
Boolean:
Parameters
Window Handle: hWindow
Static Variables
Local variables
Number: nCaption
Number: nDelta
Number: nWidth
Number: nHeight
Actions
Set nCaption = GetSystemMetrics( SM_CYCAPTION )
! standard caption size is 19 pixels
Set nDelta = nCaption - 19
If not nDelta
Return TRUE
If not SalGetWindowSize( hWindow, nWidth, nHeight )
Return FALSE
Set nHeight = SalFormUnitsToPixels( hWindow, nHeight, TRUE )
Set nHeight = nHeight + nDelta
Set nHeight = SalPixelsToFormUnits( hWindow, nHeight, TRUE )
If not SalSetWindowSize( hWindow, nWidth, nHeight )
Return FALSE
Return TRUE
....
! Windows API function defined in user32.dll
External Functions:
Library name: user32.dll
Function: GetSystemMetrics
Description:
Export Ordinal: 0
Returns
Number: INT
Parameters
Number: INT