I have vc++6.0 and I created a SDI program called TextEdit. How can I change the title of the program shown in the blue title bar region of this SDI program?
Any response anyone can give me will be greatly appreciated.
Printable View
I have vc++6.0 and I created a SDI program called TextEdit. How can I change the title of the program shown in the blue title bar region of this SDI program?
Any response anyone can give me will be greatly appreciated.
Just add this code to your PreCreateWindow function:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) {
cs.style =~ FWS_ADDTOTITLE;
cs.name = "My title";
}
If the title will always be the same, you can edit the string resource used to display the title. Click on the
"Resource" tab in theVC++ Workspace view. Expand the list of resource types, if necesary, then open the
string table (double-click it). Somewhere near the top (usually) you will find the title string. Click to edit the string,
then save your changes and re-compile.
I think you missed an &
cs.style &= ~(LONG)FWS_ADDTOTITLE;