怎么去掉单文档框架程序,标题栏上的"无标题"?

来源:互联网 发布:mes每实蛋糕 知乎 编辑:程序博客网 时间:2024/04/28 11:50
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs

m_strTitle = _T( "你想加的标题!!!" );
         cs.style =WS_OVERLAPPEDWINDOW;

return TRUE;
}

 

 

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs
    cs.style &= ~FWS_ADDTOTITLE;
    return TRUE;
}

 

原创粉丝点击