CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15

Thread: about CDocument

  1. #1
    Join Date
    Sep 2005
    Posts
    38

    about CDocument

    hi,
    I don't want that title of document is "Untitled",
    I want set it to my name.
    please tell me.

  2. #2
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: about CDocument

    How about CDocument::SetTitle()?
    Extreme situations require extreme measures

  3. #3
    Join Date
    Sep 2005
    Posts
    38

    Re: about CDocument

    how can I use CDocument:SetTitle()?
    please give me example about it.
    thanks.

  4. #4
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: about function CDocument

    Contrary to common belief, Codeguru is not ment to be a mirror of MSDN or other forms of documentation. Your question would have been answered should you have made a search on Google or MSDN first. Read here
    Last edited by PadexArt; September 7th, 2005 at 04:04 AM. Reason: typo
    Har Har

  5. #5
    Join Date
    Sep 2005
    Posts
    38

    CDocTemplate

    I have one instanse from CDocTemplate:
    CDocTemplate* pTemplate
    how can I set title of it to "My name"?
    (not "Untitled" which is default.)

  6. #6
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: CDocTemplate

    Use the Google search for Untitled "q & a" msdn (or search MSDN for Untitled "q & a") and I am sure you'll find what you need.

  7. #7
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: about CDocument

    From the View:
    Code:
    GetDocument().SetTitle(_T("This is your title"));
    From inside the document:
    Code:
    SetTitle(_T("This is your title"));
    Extreme situations require extreme measures

  8. #8
    Join Date
    Sep 2005
    Posts
    38

    Re: CDocTemplate

    I cann't find,
    please write one example.
    I can use it.

  9. #9
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Thumbs down Re: CDocTemplate

    You have 3 posts on the same topic. And on 2 of them you have the required answer.
    Har Har

  10. #10
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: CDocTemplate

    Quote Originally Posted by sep1
    I cann't find,
    please write one example.
    I can use it.
    The examples have been already written.. Have you tried a GOOGLE search?

    www.microsoft.com/msj/0198/c0198.aspx

    You could also take a look at CFrameWnd::OnUpdateFrameTitle method and search for itc using in MSDN

  11. #11
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: CDocTemplate

    [ merged threads ]
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  12. #12
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: CDocTemplate

    Sep1, I have noticed that you use to posts 2, 3 threads asking for the same question. Please stop doing that. Follow a thread until you get an answer. And please read the reply carefuly, because the answer, at least for this question, are already there,
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  13. #13
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: CDocTemplate

    Quote Originally Posted by sep1
    I cann't find,
    please write one example.
    I can use it.
    If you want to succeed in programming, you'll need to be a little more independent than this. If you need to post to a bulletin board every time you need to know how to use a function, you'll never get anywhere.

  14. #14
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: CDocTemplate

    sep1,

    You do not have to use SetTitle.As alternative edit document string that has the same ID as one you pass when document template is registered in a string table.

    For more information see "INFO: Format of the Document Template String" article Q129095 in MSDN. Make sure you read it carefuly.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  15. #15
    Join Date
    Jul 2005
    Location
    Russian Federation. Moscow
    Posts
    152

    Re: CDocTemplate

    Best regards, Alex Dronov
    Let the poster of the answers know when they helped you: Click "Rate this post!

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