A window’s system menu (now called simply window menu) features by default commands like Move, Size or Close. (When the user selects one of these commands a WM_SYSCOMMAND message is sent to the window.) What if you want to remove and add these commands on the fly? Here is how you can do it.
This is how a default Window menu looks for a dialog window.

To remove the Move command:
CMenu* pSysMenu = GetSystemMenu(FALSE);
if(pSysMenu != NULL)
pSysMenu->RemoveMenu(SC_MOVE, MF_BYCOMMAND);

To add the Move command, you can do something like this (you can also insert it at a specific position, other than 0):
CMenu* pSysMenu = GetSystemMenu(FALSE);
if(pSysMenu != NULL)
pSysMenu->InsertMenu(0, MF_BYCOMMAND, SC_MOVE, _T("Move"));
