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. ATL / WTL / STL
  4. Statusbars in dialog based application

Statusbars in dialog based application

Scheduled Pinned Locked Moved ATL / WTL / STL
questionc++com
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.
  • T Offline
    T Offline
    tareqsiraj
    wrote on last edited by
    #1

    I am new to WTL and was wondering if I could use a status bar in my applicatin. I've noticed that some of the examples (by Ed Gadziemski and Michael Dunn) use CreateSimpleStatusBar() which is only available if i derive my main form from CFrameWindowImpl. But my application is based on Dialogs and derives from CAxDialogImpl (I'm using ActiveX). Here i cannot call CreateSimpleStatusBar() and dont have the member variable m_hWndStatusBar which gets initialized by CreateSimpleStatusBar(). How do i use CMultiPaneStatusBarCtrl here? Any pointers will be helpful. Thankx in advance. -Tareq

    T 1 Reply Last reply
    0
    • T tareqsiraj

      I am new to WTL and was wondering if I could use a status bar in my applicatin. I've noticed that some of the examples (by Ed Gadziemski and Michael Dunn) use CreateSimpleStatusBar() which is only available if i derive my main form from CFrameWindowImpl. But my application is based on Dialogs and derives from CAxDialogImpl (I'm using ActiveX). Here i cannot call CreateSimpleStatusBar() and dont have the member variable m_hWndStatusBar which gets initialized by CreateSimpleStatusBar(). How do i use CMultiPaneStatusBarCtrl here? Any pointers will be helpful. Thankx in advance. -Tareq

      T Offline
      T Offline
      tareqsiraj
      wrote on last edited by
      #2

      still no reply ... so replying to myself :( ... i've tried to manually create the statusbar using CreateWindowEx and CStatusBarCtrl but no hope. the function succeedes but there is no statusbar visible. i've also tried to use ShowWindow on the statusbar but no hope. No errors reported. Plz help meeee. -Tareq

      R 1 Reply Last reply
      0
      • T tareqsiraj

        still no reply ... so replying to myself :( ... i've tried to manually create the statusbar using CreateWindowEx and CStatusBarCtrl but no hope. the function succeedes but there is no statusbar visible. i've also tried to use ShowWindow on the statusbar but no hope. No errors reported. Plz help meeee. -Tareq

        R Offline
        R Offline
        rbeckett
        wrote on last edited by
        #3

        Sometimes it's easier to use the Win32 api... eg. LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { hSTMode = ::CreateWindowEx(0L, STATUSCLASSNAME, _T("Full Auto"), WS_CHILD, 0, 0, 0, 0, m_hWnd, (HMENU)IDC_MODE_DISPLAY, _Module.GetResourceInstance(), NULL); } where hSTMode is an HWND and m_hWnd is the parent window (eg. CWindow) This will create the window if you have a corresponding message handler. You then need to send SB_SETPARTS to hSTMode which will fill in the window with rects and stuff. See the MSDN documentation under common controls for an example. Ryan

        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