The GetSystemMenu function allows the application to access the window menu (also known as the system menu or the control menu) for copying and modifying.
Attaching menu to a top-level form
Adding user-defined items to the Control Menu of VFP form (requires VFP9)
HMENU GetSystemMenu(
HWND hWnd, // handle to window
BOOL bRevert // reset option
);
DECLARE INTEGER GetSystemMenu IN user32;
INTEGER hWnd,;
INTEGER bRevert
hWnd [in] Handle to the window that will own a copy of the window menu.
bRevert [in] Specifies the action to be taken. The FALSE means that GetSystemMenu returns a handle to the copy of the window menu currently in use.
If the bRevert parameter is FALSE, the return value is a handle to a copy of the window menu. If the bRevert parameter is TRUE, the return value is NULL.