去掉自动显示标题栏的文字...

来源:互联网 发布:php抓取网页数据效果 编辑:程序博客网 时间:2024/05/03 10:40

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 cs.style &= ~FWS_ADDTOTITLE;

 if( !CFrameWnd::PreCreateWindow(cs) )
           return FALSE
 return TRUE;
}


void CTextView::OnInitialUpdate()
{

 CFormView::OnInitialUpdate();
 AfxGetMainWnd ( )->SetWindowText(_T("我的标题"));

// 如果是MDI窗口.   用GetParentFrame ( ) —> SetWindowText ("_T ("MDI Child Frame new title")

}

如果是弹出来的对话框

BOOL CChooseDlg::OnInitDialog()
{
      CDialog::OnInitDialog();
       CChooseDlg::SetWindowText("我的标题");
       return TRUE; 

}