Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CallWindowProc and WM_GetMinMaxInfo
Message
From
06/04/2009 13:26:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01392525
Message ID:
01393494
Views:
51
>As a wrap up to this thread if anyone uses it for reference down the road.
>
>This is probably a rookie mistake, but it's important to note that VFP's "ThisForm.Width" and "ThisForm.Height" reference only the inner portion of the form, not the titlebar and window borders. The WM_SIZING rectangle values for the form DO include these items. You can add SYSMETRIC(9) + (SYSMETRIC(4)*2) to your ThisForm.Height value to match and add (SYSMETRIC(4)*2) to match your ThisForm.Width value.
>
>If you're doing percentage calculations from a component inside the form to the form itself, these differences can really throw you off.

Now that you've dug it out, it makes a lot of sense. The sizes of the outer elements of a form may differ from system to system, depending on many things - size of the controlbox as the user decided in the display applet of the control panel, fontsize for form captions, and the widget library used by the windows manager (i.e. various skins, themes et al, including other window managers, like the bbLean that I'm using). Since the window innards are under VFP's control and the outer shell is done by the Windows level window manager, then it's (now) become obvious that each takes their own measurements into account.

Pixel counting was always easy, but never simple :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform