Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing Next menu item from Form's control box
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00520294
Message ID:
00520299
Views:
16
>>HEllo All,
>>
>>Is there a way to remove/disable Next (CTRL+F6) menu item on form's control >box in ULH corner? I've tried to remove it with RemoveMenu API finction but >it requires a handle to window. I tries to get it with GetActiveWindow() API >function but it seems that this handle belongs to _screen rather than form.
>
>Well, it seems like the following code does the trick:
>
>
>SET LIBRARY TO (HOME()+'foxtools.fll') ADDITIVE
>lnWHandle = _WFindTitl(THISFORM.CAPTION)
>HWND = _WhToHWnd(lnWHandle)
>
>#DEFINE MF_BYPOSITION 0x400
>DECLARE INTEGER GetSystemMenu IN WIN32API integer,integer
>DECLARE INTEGER RemoveMenu IN WIN32API integer,integer,integer
>hSysMenu = GetSystemMenu(hWnd, 0)
>For j = 8 To 7 Step -1
> r = RemoveMenu(hSysMenu, j, MF_BYPOSITION)
>endfor
>
>
>
>Now, the question is "Is there any way to replace foxtools functions with their API analogs?"
>
>TIA

Probably using FindWindow() to get the main VFP window, then FindWindowEx() to retrieve the child caption. FWIW, all VFP windows have the window handle hWnd as a property in 7.0.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform