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. BackGround color of Status Bar

BackGround color of Status Bar

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

    Hi, I'm able to set the text and the background color of the text for Status bar, but I'm not able to set the color for the 'seperator' of the status bar. I have 3 column on the status bar, each of the text and background I'm able to set it but have no luck on the 'seperator' I've done it by creating a custom status bar inherited from CStatusBar By drawing it on DrawItem CODE: CDC oDC; CDC* pdc = CDC::FromHandle(pDIS->hDC); pdc->FillSolidRect(&pDIS->rcItem, RGB(255,255,255)); oDC.Attach(pDIS->hDC); oDC.SetTextColor(RGB(255,0,0)); oDC.SetBkColor(pDIS->itemData); pDIS->rcItem.left += 2; oDC.DrawText(_T("Test"),&pDIS->rcItem,DT_LEFT); oDC.Detach(); Any ways to do this? I wanted to change the whole status bar into white color RGB(255,255,255) Any help would be appreciated. KH

    good

    K _ 2 Replies Last reply
    0
    • K karhong

      Hi, I'm able to set the text and the background color of the text for Status bar, but I'm not able to set the color for the 'seperator' of the status bar. I have 3 column on the status bar, each of the text and background I'm able to set it but have no luck on the 'seperator' I've done it by creating a custom status bar inherited from CStatusBar By drawing it on DrawItem CODE: CDC oDC; CDC* pdc = CDC::FromHandle(pDIS->hDC); pdc->FillSolidRect(&pDIS->rcItem, RGB(255,255,255)); oDC.Attach(pDIS->hDC); oDC.SetTextColor(RGB(255,0,0)); oDC.SetBkColor(pDIS->itemData); pDIS->rcItem.left += 2; oDC.DrawText(_T("Test"),&pDIS->rcItem,DT_LEFT); oDC.Detach(); Any ways to do this? I wanted to change the whole status bar into white color RGB(255,255,255) Any help would be appreciated. KH

      good

      K Offline
      K Offline
      karhong
      wrote on last edited by
      #2

      Is there any ways for me to set the seperator on the status bar become smaller?? by default, the width of it is 0.1cm Or can I disable/remove the seperator between the item in the status bar ??

      good

      modified on Tuesday, January 13, 2009 3:03 AM

      1 Reply Last reply
      0
      • K karhong

        Hi, I'm able to set the text and the background color of the text for Status bar, but I'm not able to set the color for the 'seperator' of the status bar. I have 3 column on the status bar, each of the text and background I'm able to set it but have no luck on the 'seperator' I've done it by creating a custom status bar inherited from CStatusBar By drawing it on DrawItem CODE: CDC oDC; CDC* pdc = CDC::FromHandle(pDIS->hDC); pdc->FillSolidRect(&pDIS->rcItem, RGB(255,255,255)); oDC.Attach(pDIS->hDC); oDC.SetTextColor(RGB(255,0,0)); oDC.SetBkColor(pDIS->itemData); pDIS->rcItem.left += 2; oDC.DrawText(_T("Test"),&pDIS->rcItem,DT_LEFT); oDC.Detach(); Any ways to do this? I wanted to change the whole status bar into white color RGB(255,255,255) Any help would be appreciated. KH

        good

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        Did you try to handle the WM_CTLCOLOR to change the status bar color?

        «_Superman_»

        K 1 Reply Last reply
        0
        • _ _Superman_

          Did you try to handle the WM_CTLCOLOR to change the status bar color?

          «_Superman_»

          K Offline
          K Offline
          karhong
          wrote on last edited by
          #4

          Do i Change the WM_CTLCOLOR on my CCustomStatusBar or on the MainFrm ? KH

          good

          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