 |
SetMenu ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The SetMenu function assigns a new menu to the specified window. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-12-09 12:08:41 | | Modified: | 2001-12-09 12:13:21 | Visited in last 7 days: 23 |