CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    327

    how can I change my main window's title

    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.


  2. #2
    Join Date
    Apr 1999
    Posts
    306

    Re: how can I change my main window's title

    Just add this code to your PreCreateWindow function:

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) {

    cs.style =~ FWS_ADDTOTITLE;
    cs.name = "My title";

    }


  3. #3
    Guest

    Re: how can I change my main window's 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.


  4. #4
    Guest

    Re: how can I change my main window's title

    I think you missed an &

    cs.style &= ~(LONG)FWS_ADDTOTITLE;



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured