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. status bar

status bar

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
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
    Anonymous
    wrote on last edited by
    #1

    How can I change the content of the status bar of the main frame in view.cpp ? Thanks!

    D 1 Reply Last reply
    0
    • A Anonymous

      How can I change the content of the status bar of the main frame in view.cpp ? Thanks!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Last I read it was very difficult to alter the text in pane 0. This is because the MFC framework is always writing something to it, so even if you wrote something else to it, it would only last a fraction of a second until MFC changed it. Depending on what you are doing, it might be better to create a second pane and write to it.


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      U 1 Reply Last reply
      0
      • D David Crow

        Last I read it was very difficult to alter the text in pane 0. This is because the MFC framework is always writing something to it, so even if you wrote something else to it, it would only last a fraction of a second until MFC changed it. Depending on what you are doing, it might be better to create a second pane and write to it.


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        U Offline
        U Offline
        ucc801
        wrote on last edited by
        #3

        With the following steps: 1.Define a value,such as ID_FO_INDEX_MOUSEPOS. static UINT indicators[] = { ID_SEPARATOR, // status line indicator ID_FO_INDEX_MOUSEPOS, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, }; 2.Add a update message to your view. afx_msg void OnUpdateMousePos(CCmdUI *pCmdUI); ON_UPDATE_COMMAND_UI(ID_FO_INDEX_MOUSEPOS, OnUpdateMousePos) 3.Change it with the following style: void CFOPCanvasCore::OnUpdateMousePos(CCmdUI *pCmdUI) { pCmdUI->SetText(m_IndMousePosString); } Jack --------------------------------------------------------------------------------- XD++ MFC/C++ Flow/Diagram Library -- http://www.ucancode.net

        D 1 Reply Last reply
        0
        • U ucc801

          With the following steps: 1.Define a value,such as ID_FO_INDEX_MOUSEPOS. static UINT indicators[] = { ID_SEPARATOR, // status line indicator ID_FO_INDEX_MOUSEPOS, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, }; 2.Add a update message to your view. afx_msg void OnUpdateMousePos(CCmdUI *pCmdUI); ON_UPDATE_COMMAND_UI(ID_FO_INDEX_MOUSEPOS, OnUpdateMousePos) 3.Change it with the following style: void CFOPCanvasCore::OnUpdateMousePos(CCmdUI *pCmdUI) { pCmdUI->SetText(m_IndMousePosString); } Jack --------------------------------------------------------------------------------- XD++ MFC/C++ Flow/Diagram Library -- http://www.ucancode.net

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          You'll also need a stringtable entry for ID_FO_INDEX_MOUSEPOS in the project's .rc file.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          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