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. Brush and Window Color ...

Brush and Window Color ...

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
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.
  • H Offline
    H Offline
    Hadi Rezaee
    wrote on last edited by
    #1

    Hi there, How can i make a Brush with default window color ?! I just tried below code, but it doesn't work :( : HBRUSH hBrush = ::GetSysColorBrush( COLOR_WINDOW ); When i use below code to make the brush (with XP default window color), it just works fine (as u see, the i passed the color HANDY (!!), i'm looking for code that make that automatically. ) :confused: : HBRUSH hBrush = CreateSolidBrush( RGB( 236, 233, 210 ) ); I want to use the brush for painting a Static Control (Custom control) background ... (in CtlColor function, ON_WM_CTLCOLOR_REFLECT() msg) Please help :) Regards, Hadi

    H 1 Reply Last reply
    0
    • H Hadi Rezaee

      Hi there, How can i make a Brush with default window color ?! I just tried below code, but it doesn't work :( : HBRUSH hBrush = ::GetSysColorBrush( COLOR_WINDOW ); When i use below code to make the brush (with XP default window color), it just works fine (as u see, the i passed the color HANDY (!!), i'm looking for code that make that automatically. ) :confused: : HBRUSH hBrush = CreateSolidBrush( RGB( 236, 233, 210 ) ); I want to use the brush for painting a Static Control (Custom control) background ... (in CtlColor function, ON_WM_CTLCOLOR_REFLECT() msg) Please help :) Regards, Hadi

      H Offline
      H Offline
      Hadi Rezaee
      wrote on last edited by
      #2

      YESSS ! The problem has been solved :) ROCK ON !!! :cool: Regards, Hadi

      J 1 Reply Last reply
      0
      • H Hadi Rezaee

        YESSS ! The problem has been solved :) ROCK ON !!! :cool: Regards, Hadi

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        :laugh::laugh::laugh: Now thats what I call a good answer! INTP Every thing is relative...

        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