Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ds
Language: C/C++
Code:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
//Remove positions of menu

CMenu* pTopMenu = GetSystemMenu(FALSE);

pTopMenu -> RemoveMenu(4,MF_BYPOSITION); //Maximize
pTopMenu -> RemoveMenu(2,MF_BYPOSITION); //Size
pTopMenu -> RemoveMenu(1,MF_BYPOSITION); //Move

return 0;
}

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 if( !CFrameWnd::PreCreateWindow(cs) )
  return FALSE;

 cs.style &= ~WS_THICKFRAME;

 //If you use buttons MAXIMIZE and MINIMIZE in the caption,
 // insert next string!!!!!!
 cs.style &= ~WS_MAXIMIZEBOX;

 return TRUE;
}     
          
Comments: