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. Appearing/Disappearing Asterisk in Title Bar

Appearing/Disappearing Asterisk in Title Bar

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiotutorialquestion
3 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.
  • M Offline
    M Offline
    Marc Tompkins
    wrote on last edited by
    #1

    I am working on an MFC MDI application. I'd like to have the document title (in the app's title bar) display an asterisk at the end when the document has been changed. When the document is saved, the asterisk disappears. MS Visual Studio's text editor has this capability. Any suggestions on how to add this capability? Marc

    C J 2 Replies Last reply
    0
    • M Marc Tompkins

      I am working on an MFC MDI application. I'd like to have the document title (in the app's title bar) display an asterisk at the end when the document has been changed. When the document is saved, the asterisk disappears. MS Visual Studio's text editor has this capability. Any suggestions on how to add this capability? Marc

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      With AfxGetMainWnd you can get The main window Handle then you can use GetWindowText for read the Title and add a Asterisk when the docuement is changed using SetWindowText for write the new title. But Warning you can fill the Title with several asterisks, you need a control like a variable for this... Regards... Carlos Antollini. Sonork ID 100.10529 cantollini

      1 Reply Last reply
      0
      • M Marc Tompkins

        I am working on an MFC MDI application. I'd like to have the document title (in the app's title bar) display an asterisk at the end when the document has been changed. When the document is saved, the asterisk disappears. MS Visual Studio's text editor has this capability. Any suggestions on how to add this capability? Marc

        J Offline
        J Offline
        Joaquin M Lopez Munoz
        wrote on last edited by
        #3

        CDocument provides some methods to maintain the "changed and unsaved" state, namely IsModified and SetModifiedFlag. I guess the best solution is to override SetModifiedFlag (assuming your app is using this method consistently) and change there the document's title accordingly using SetTitle. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        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