Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to maintain different title bars' caption ?

How to maintain different title bars' caption ?

Scheduled Pinned Locked Moved C / C++ / MFC
htmlhelptutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    leonwoo
    wrote on last edited by
    #1

    hi, I have written a MDI program that can create three different views. The problem is that i have no idea on how to maintain each view's title bar's caption. I use back the same doc class for all the view class. I did something like this: CDocument * pDoc; pDodc->SetTitle("HTML View");//for each different view, different caption When i create a new different view (with other views created earlier), the title bars' caption of all the previously created views follow the caption of the new view. Any idea on how to avoid such situation?? Thanks in advance. :confused: leonwoo

    M L 2 Replies Last reply
    0
    • L leonwoo

      hi, I have written a MDI program that can create three different views. The problem is that i have no idea on how to maintain each view's title bar's caption. I use back the same doc class for all the view class. I did something like this: CDocument * pDoc; pDodc->SetTitle("HTML View");//for each different view, different caption When i create a new different view (with other views created earlier), the title bars' caption of all the previously created views follow the caption of the new view. Any idea on how to avoid such situation?? Thanks in advance. :confused: leonwoo

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Overload CMDIChildWnd::OnUpdateFrameTitle() and in that method, set the text to whatever you like. --Mike-- http://home.inreach.com/mdunn/ The preferred snack of 4 out of 5 Lounge readers.

      L 1 Reply Last reply
      0
      • M Michael Dunn

        Overload CMDIChildWnd::OnUpdateFrameTitle() and in that method, set the text to whatever you like. --Mike-- http://home.inreach.com/mdunn/ The preferred snack of 4 out of 5 Lounge readers.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Thanks for your answer Micheal.

        1 Reply Last reply
        0
        • L leonwoo

          hi, I have written a MDI program that can create three different views. The problem is that i have no idea on how to maintain each view's title bar's caption. I use back the same doc class for all the view class. I did something like this: CDocument * pDoc; pDodc->SetTitle("HTML View");//for each different view, different caption When i create a new different view (with other views created earlier), the title bars' caption of all the previously created views follow the caption of the new view. Any idea on how to avoid such situation?? Thanks in advance. :confused: leonwoo

          L Offline
          L Offline
          l a u r e n
          wrote on last edited by
          #4

          in the OnCreate() function of your view's frame window change the lpszWindowName parameter to what you want it to be :suss: --- "every year we invent better idiot proof systems and every year they invent better idiots"

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups