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

    Removing 'Untitled' text

    I have an SDI application. I gave my application a title in the string table. But when the application comes up, it shows Untitled

    <Application Name>.

    How do I get rid of this Untitled

    from the application's title bar?


  2. #2
    Join Date
    May 1999
    Posts
    17

    Re: Removing 'Untitled' text

    You need change the window style for the mainframe. Go to your MainFrame implementation codes, change the style in ::PreCreate() (I don't remember exactly which member function, should be obvious though). I did this once some time ago. I will check my codes and give exactly what needs to be done tommorrow.


  3. #3
    Join Date
    Apr 1999
    Posts
    23

    Re: Removing 'Untitled' text

    Call SetTitle() on the docoument(CDocument) to change the Untitled string


  4. #4
    Join Date
    May 1999
    Posts
    69

    Re: Removing 'Untitled' text

    PreCreateWindow(CreateStruct cs...
    AddToTitle property


    chrislaw

  5. #5
    Join Date
    Apr 1999
    Posts
    90

    Re: Removing 'Untitled' text

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
    {
    if( !CFrameWnd::PreCreateWindow(cs) )
    return FALSE;

    // TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs

    cs.style &= ~FWS_ADDTOTITLE;
    return TRUE;
    }



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