Using Win32 functions in Visual FoxPro Image Gallery
Menu
..msdn
AppendMenu
CreateMenu
CreatePopupMenu
DeleteMenu
DestroyMenu
DrawMenuBar
GetMenu
GetMenuBarInfo
GetMenuItemCount
GetMenuItemID
GetMenuItemInfo
GetMenuString
GetSubMenu
GetSystemMenu
InsertMenuItem
IsMenu
SetMenu
TrackPopupMenuEx
Code examples:
Attaching menu to a top-level form
SetMenu
..msdn    Add comment     W32 Constants      Translate this page
The SetMenu function assigns a new menu to the specified window.
Code examples:
Attaching menu to a top-level form
Declaration:
BOOL SetMenu(
  HWND hWnd,  // handle to window
  HMENU hMenu // handle to menu
);
FoxPro declaration:
DECLARE INTEGER SetMenu IN user32;
    INTEGER hWnd,;
    INTEGER hMenu
Parameters:
hWnd
[in] Handle to the window to which the menu is to be assigned.

hMenu
[in] Handle to the new menu. If this parameter is NULL, the window"s current menu is removed.
Return value:
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
My comment:
A menu can be assigned to any window that is not a child window. For the VFP forms it means that only those with ShowWindow property equal to 2 (top-level windows) can accept the menu.

The SetMenu function replaces the previous menu, if any, but it does not destroy it. An application should call the DestroyMenu function to accomplish this task.
Word Index links for the SetMenu :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-12-09 12:08:41
Modified: 2001-12-09 12:13:21
Visited in last 7 days: 14
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.36), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.20.24.116)
11 sec.Function: 'QueryPerformanceFrequency'
20 sec.Function: 'waveOutGetNumDevs'
29 sec.Function: 'send'
45 sec.Function: 'SQLManageDataSources'
54 sec.Function: 'SelectObject'
1.05 min.Function: 'StretchBlt'
1.33 min.Function: 'SHEnumKeyEx'
1.48 min.Function: 'waveOutGetErrorText'
1.62 min.Function: 'SQLGetFunctions'
1.77 min.Function: 'ShowWindow'
Google
Advertise here!