create statusBar in dialog problem
-
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.
-
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.
-
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.
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[^]
-
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[^]
thanks a lot it's working now.