Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get REAL window border width even with Win32API
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00060909
Message ID:
00061059
Views:
38
George,

Thanks for your reply. I'm not talking about child windows, only top-level windows, i.e. SDI forms (with ShowWindow = 2) and the VFP main window (_screen). These types of top-level windows can contain toolbars, and these may or may not be docked on the sides of the windows. When a toolbar is docked at the top or left edge of the window, the 0,0 position is automatically adjusted by VFP. Unfortunately, I can find no general way to detect and account for this in my calculation of the effective border widths (including the docked toolbar part). SYSMETRIC() only returns constant values for the various border components, and nothing specifically related to toolbars. Even if it did have a way of asking for standard toolbar dimensions, it wouldn't tell me that there's a toolbar docked at the top of a particular window, for example.

You suggested that I look at FoxTools stuff and made reference to some "FOXTOOLS functions", specifically _WHToHWnd and _WFindTitl. If my understanding is correct, these are API functions, not FoxTools functions. Are you saying that I can invoke API functions directly from VFP? I though they only applied to C/C++. Anyway, I don't think the particular functions you mentioned are going to be of help. If there are some other API functions that would be more appropriate, that would be interesting to know about. If there is any way to use API functions directly from VFP (e.g. via DECLARE - DLL), that would also be news to me.

>
>GetActiveWindow doesn't return values for child windows. The value that it returns is that of the main FoxPro window (the same value that MainHWnd() in FOXTOOLS returns. Try using lnHWnd = _WHToHWnd(_WFindTitl(ThisForm.Caption)) (FOXTOOLS functions) instead.
>
>I might be missing something, but doesn't SYSMETRIC() return the values you need?
>
>hth,
>
>George
Montage

"Free at last..."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform