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. Chnaging Window Title

Chnaging Window Title

Scheduled Pinned Locked Moved C / C++ / MFC
architecturequestion
4 Posts 3 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.
  • A Offline
    A Offline
    Abhijeet Pathak
    wrote on last edited by
    #1

    Hi, I have created a SDI application with Document/View architecture. Now every time the app starts, it displays the title "Untitled: SampleApp" in the Title Bar. What I want to do is to display only software name there. (e.g. "Sample App") How should I do that. --- Why buy the cow when milk is free?

    T J 2 Replies Last reply
    0
    • A Abhijeet Pathak

      Hi, I have created a SDI application with Document/View architecture. Now every time the app starts, it displays the title "Untitled: SampleApp" in the Title Bar. What I want to do is to display only software name there. (e.g. "Sample App") How should I do that. --- Why buy the cow when milk is free?

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      call SetWindowText()


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      1 Reply Last reply
      0
      • A Abhijeet Pathak

        Hi, I have created a SDI application with Document/View architecture. Now every time the app starts, it displays the title "Untitled: SampleApp" in the Title Bar. What I want to do is to display only software name there. (e.g. "Sample App") How should I do that. --- Why buy the cow when milk is free?

        J Offline
        J Offline
        JudyL_MD
        wrote on last edited by
        #3

        override PreCreateWindow

        BOOL CMainFrame::PreCreateWindow (CREATESTRUCT& cs)
        {
        // remove "untitled" from the title bar of the window
        cs.style &= ~FWS_ADDTOTITLE;

        return CFrameWnd::PreCreateWindow (cs);
        

        }

        Judy

        A 1 Reply Last reply
        0
        • J JudyL_MD

          override PreCreateWindow

          BOOL CMainFrame::PreCreateWindow (CREATESTRUCT& cs)
          {
          // remove "untitled" from the title bar of the window
          cs.style &= ~FWS_ADDTOTITLE;

          return CFrameWnd::PreCreateWindow (cs);
          

          }

          Judy

          A Offline
          A Offline
          Abhijeet Pathak
          wrote on last edited by
          #4

          Hey, thanks it's just what i wanted.... i guess i need to read a lot... Regards, Abhijeet

          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