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. CStatusBar problem

CStatusBar problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 2 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.
  • K Offline
    K Offline
    karkulka
    wrote on last edited by
    #1

    With CFrameWnd I can simply insert status bar by CStatusBar x(this) in OnCreate. But with CWnd it doesn't work. What else have I to do?

    Z 1 Reply Last reply
    0
    • K karkulka

      With CFrameWnd I can simply insert status bar by CStatusBar x(this) in OnCreate. But with CWnd it doesn't work. What else have I to do?

      Z Offline
      Z Offline
      zeki yugnak
      wrote on last edited by
      #2

      hi.. firstly you should define indicators names,like that.

      static UINT indicators[] ={ID_SEPARATOR};

      then you must add "ID_SEPARATOR" to string table on your project.Lastly You must write this code in OnCreate.

      m_wndStatusBar.Create(this);
      m_wndStatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT));

      it is not enough what you had only created for that. Good Work.

      K 1 Reply Last reply
      0
      • Z zeki yugnak

        hi.. firstly you should define indicators names,like that.

        static UINT indicators[] ={ID_SEPARATOR};

        then you must add "ID_SEPARATOR" to string table on your project.Lastly You must write this code in OnCreate.

        m_wndStatusBar.Create(this);
        m_wndStatusBar.SetIndicators(indicators,sizeof(indicators)/sizeof(UINT));

        it is not enough what you had only created for that. Good Work.

        K Offline
        K Offline
        karkulka
        wrote on last edited by
        #3

        Why indicators...you don't have to set them when constructing a status bar....the problem is: it's working with CFrameWnd, with CWnd it is not.

        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