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. What color is gray?

What color is gray?

Scheduled Pinned Locked Moved C / C++ / MFC
regextutorialquestion
5 Posts 4 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
    Aaron Schaefer
    wrote on last edited by
    #1

    Hi, I need to know how to specify the system color used in a GRAY_BRUSH as an RGB macro. In other words, if I have something like RGB(r, g, b) Then what values should r, g, and b equal to match LTGRAY_BRUSH, GRAY_BRUSH, etc. Are there some defined constants for gray, light gray, etc? Thanks, Aaron

    R C D 3 Replies Last reply
    0
    • A Aaron Schaefer

      Hi, I need to know how to specify the system color used in a GRAY_BRUSH as an RGB macro. In other words, if I have something like RGB(r, g, b) Then what values should r, g, and b equal to match LTGRAY_BRUSH, GRAY_BRUSH, etc. Are there some defined constants for gray, light gray, etc? Thanks, Aaron

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      In terms of RGB, lt gray is (192, 192, 192), medium gray is (128, 128, 128) and dark grey is (64, 64, 64). Not sure if this information actually helps you. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

      1 Reply Last reply
      0
      • A Aaron Schaefer

        Hi, I need to know how to specify the system color used in a GRAY_BRUSH as an RGB macro. In other words, if I have something like RGB(r, g, b) Then what values should r, g, and b equal to match LTGRAY_BRUSH, GRAY_BRUSH, etc. Are there some defined constants for gray, light gray, etc? Thanks, Aaron

        C Offline
        C Offline
        Chad Koehler
        wrote on last edited by
        #3

        You can user the GetSystemColor() function to get any of the Windows system colors. You can use GetRValue() GetGValue() and GetBValue() to get the actual values (that you may or may not still need).

        A 1 Reply Last reply
        0
        • A Aaron Schaefer

          Hi, I need to know how to specify the system color used in a GRAY_BRUSH as an RGB macro. In other words, if I have something like RGB(r, g, b) Then what values should r, g, and b equal to match LTGRAY_BRUSH, GRAY_BRUSH, etc. Are there some defined constants for gray, light gray, etc? Thanks, Aaron

          D Offline
          D Offline
          Dimitri Rochette
          wrote on last edited by
          #4

          Hope this could help you. GetSysColorBrush http://msdn.microsoft.com/library/en-us/wceui40/htm/cerefGetSysColorBrush.asp GetSysColor http://msdn.microsoft.com/library/en-us/sysinfo/base/getsyscolor.asp

          1 Reply Last reply
          0
          • C Chad Koehler

            You can user the GetSystemColor() function to get any of the Windows system colors. You can use GetRValue() GetGValue() and GetBValue() to get the actual values (that you may or may not still need).

            A Offline
            A Offline
            Aaron Schaefer
            wrote on last edited by
            #5

            Thanks for the tips! I think the GetSysColor is the one I need.

            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