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. Colors in visual c++ MFC

Colors in visual c++ MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
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.
  • F Offline
    F Offline
    Fredrik
    wrote on last edited by
    #1

    I have a problem setting the colors of my MFC application. I have set the background of my dialog window with SetDialogBgcolor(); but the border is still using the system colors. How do i set the color of the border? Another problem I have is that the little arrow on my ComboBox is also set by the system colors, and I can't find a way to change it. I have a slider in my application, wich background changed with SetDialogBgcolor(); but I also want to change the color of the thing you slide and the area witch it slides on, but I have no clue how and where to change these. I also need to know how I change the color om my menu. Thankful for any help =) /Fredrik

    M 1 Reply Last reply
    0
    • F Fredrik

      I have a problem setting the colors of my MFC application. I have set the background of my dialog window with SetDialogBgcolor(); but the border is still using the system colors. How do i set the color of the border? Another problem I have is that the little arrow on my ComboBox is also set by the system colors, and I can't find a way to change it. I have a slider in my application, wich background changed with SetDialogBgcolor(); but I also want to change the color of the thing you slide and the area witch it slides on, but I have no clue how and where to change these. I also need to know how I change the color om my menu. Thankful for any help =) /Fredrik

      M Offline
      M Offline
      Mustafa Demirhan
      wrote on last edited by
      #2

      Hi, Add the following code to your Dialogs OnPaint() method. If a method like this doesnt exist, you can add it from Class Wizard. void CYourDialog::OnPaint() { CPaintDC dc(this); // device context for painting CRect rect; GetWindowRect(&rect); ScreenToClient(&rect); dc.FillSolidRect(rect, 0x00000000); //set bk color to black } I am sorry that i cannot answer your other questions. Mustafa Demirhan

      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