1. Most VC++ programmers forget to add following red colored line to PreCreateWindow function in MainFrm.cpp of your SDI/MDI application.
2. Calling SetWindowText alone for title will not work until this line is added
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 cs.style &= ~FWS_ADDTOTITLE;
 if( !CFrameWnd::PreCreateWindow(cs) )
  return FALSE;
 return TRUE;
}
0 Comments