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. System's Color Palette

System's Color Palette

Scheduled Pinned Locked Moved C / C++ / MFC
questionworkspace
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.
  • N Offline
    N Offline
    netx2003
    wrote on last edited by
    #1

    Hello, I am looking for a way to detect the system's color palette( On XP color quality). This is setup on the Display Properties at the settings tab. I need to know if the computer is running using "16 Color", "255 Color", "16 Bit" and so on. Any ideas?

    M 1 Reply Last reply
    0
    • N netx2003

      Hello, I am looking for a way to detect the system's color palette( On XP color quality). This is setup on the Display Properties at the settings tab. I need to know if the computer is running using "16 Color", "255 Color", "16 Bit" and so on. Any ideas?

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      HDC dc = GetDC(NULL);
      int nBPP = GetDeviceCaps ( dc, BITSPIXEL );
      ReleaseDC(NULL, dc);

      nBPP holds the number of bits per pixel. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber | RightClick-Encrypt Pinky, are you pondering what I'm pondering? I think so Brain, but if we shaved our heads, we'd look like weasels!

      N 1 Reply Last reply
      0
      • M Michael Dunn

        HDC dc = GetDC(NULL);
        int nBPP = GetDeviceCaps ( dc, BITSPIXEL );
        ReleaseDC(NULL, dc);

        nBPP holds the number of bits per pixel. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber | RightClick-Encrypt Pinky, are you pondering what I'm pondering? I think so Brain, but if we shaved our heads, we'd look like weasels!

        N Offline
        N Offline
        netx2003
        wrote on last edited by
        #3

        Thanks, just what I was looking for.

        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