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. How to change colors of system brushes for current task only

How to change colors of system brushes for current task only

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 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.
  • S Offline
    S Offline
    skaanji
    wrote on last edited by
    #1

    Is it possible to change colors of system brushes (COLOR_WINDOW,COLOR_3DFACE and so on) for current task only? SetSysColors() makes it for whole system.

    J 1 Reply Last reply
    0
    • S skaanji

      Is it possible to change colors of system brushes (COLOR_WINDOW,COLOR_3DFACE and so on) for current task only? SetSysColors() makes it for whole system.

      J Offline
      J Offline
      Joseph Dempsey
      wrote on last edited by
      #2

      i don't think you can do that. If you are coding a project and you want to isolate the colors that i would suggest you use a global function that does something like.

      COLORREF MyGetSysColor( int nIndex )
      {
      COLORREF clr = 0;
      switch( nIndex )
      {
      case COLOR_WINDOW:
      clr = RGB( 255,0,255 );
      break;
      case COLOR_3DFACE:
      clr = RGB( 239, 130, 0 );
      break;
      default:
      clr = ::GetSysColor( nIndex );
      break;
      };
      return clr;
      }

      Thats probably the best you're going to get away with, that is without changing the entire system's color scheme. Joseph Dempsey joseph_r_dempsey@yahoo.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous

      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