Promote Your Blog

Thursday, January 19, 2012

How To Display Window Title in SDI/MDI application

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)
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;

No comments:

Post a Comment