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. create statusBar in dialog problem

create statusBar in dialog problem

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

    I am trying to create a statusBar in the dialog but it's returning false. not creating the status bar please tell me whats going wrong in this. Thanks for any help. I am creating the status bar in the OnInitDialog() function [code] CStatusBar m_wndStatusBar; // member variable in the dialog header. BOOL CDlgsViewDlg::OnInitDialog() { CDialog::OnInitDialog(); if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return FALSE; // fail to create } m_wndStatusBar.SetPaneText(0,L"MainWindow Initialized"); } [/code] it's returning false. please help me.

    C C 2 Replies Last reply
    0
    • A appollosputnik

      I am trying to create a statusBar in the dialog but it's returning false. not creating the status bar please tell me whats going wrong in this. Thanks for any help. I am creating the status bar in the OnInitDialog() function [code] CStatusBar m_wndStatusBar; // member variable in the dialog header. BOOL CDlgsViewDlg::OnInitDialog() { CDialog::OnInitDialog(); if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return FALSE; // fail to create } m_wndStatusBar.SetPaneText(0,L"MainWindow Initialized"); } [/code] it's returning false. please help me.

      C Offline
      C Offline
      chenxi_1
      wrote on last edited by
      #2

      see http://www.cppblog.com/besterChen/archive/2009/04/03/78846.html[^] Language: chs

      1 Reply Last reply
      0
      • A appollosputnik

        I am trying to create a statusBar in the dialog but it's returning false. not creating the status bar please tell me whats going wrong in this. Thanks for any help. I am creating the status bar in the OnInitDialog() function [code] CStatusBar m_wndStatusBar; // member variable in the dialog header. BOOL CDlgsViewDlg::OnInitDialog() { CDialog::OnInitDialog(); if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return FALSE; // fail to create } m_wndStatusBar.SetPaneText(0,L"MainWindow Initialized"); } [/code] it's returning false. please help me.

        C Offline
        C Offline
        Chandrakantt
        wrote on last edited by
        #3

        You can create status bar by calling

        m_wndStatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW,
        CRect(0,0,0,0), this, 0);

        You can have a look at Toolbar & StatusBar on Dialog[^]

        A 1 Reply Last reply
        0
        • C Chandrakantt

          You can create status bar by calling

          m_wndStatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW,
          CRect(0,0,0,0), this, 0);

          You can have a look at Toolbar & StatusBar on Dialog[^]

          A Offline
          A Offline
          appollosputnik
          wrote on last edited by
          #4

          thanks a lot it's working now.

          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