May 20th, 1999, 06:04 PM
Hi,
My application requires no menu bar n caption..below r the functins i m overriding to do this. Its working allright but problem starts when a context menu appears on right click on my client area..in which case caption bar reappears ...n also when i simply click on application on task bar.
can anyone help me Plz
Thanks
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
//to remove menu bar frm application
if (cs.hMenu != NULL)
{
::DestroyMenu(cs.hMenu);
cs.hMenu = NULL;
}
cs.style = WS_DLGFRAME ;
return CFrameWnd::PreCreateWindow(cs);
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
ModifyStyle(WS_CAPTION | WS_SYSMENU, 0);
// TODO: Add your specialized creation code here
return 0;
}
My application requires no menu bar n caption..below r the functins i m overriding to do this. Its working allright but problem starts when a context menu appears on right click on my client area..in which case caption bar reappears ...n also when i simply click on application on task bar.
can anyone help me Plz
Thanks
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
//to remove menu bar frm application
if (cs.hMenu != NULL)
{
::DestroyMenu(cs.hMenu);
cs.hMenu = NULL;
}
cs.style = WS_DLGFRAME ;
return CFrameWnd::PreCreateWindow(cs);
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
ModifyStyle(WS_CAPTION | WS_SYSMENU, 0);
// TODO: Add your specialized creation code here
return 0;
}