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. Help with colors in MFC, damn I'm bad at painting :)

Help with colors in MFC, damn I'm bad at painting :)

Scheduled Pinned Locked Moved C / C++ / MFC
4 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

    Hello! I have been trying to set the color of a slider I created with MFC. I managed to color it's background but didn't manage to change the slider "knob" or "path" color, how is this done? I also have a Combobox wich I would like to change the color of as well, but it didn't work out either. I tried to check the "owner drawn and with strings on the Combobox, but I still couldn't change the colors and over the text was the picture of my icon, hmm... Then there's the frame of the window, I beieve I should override OnNcPaint() function for this but either I'm wrong or doig it wrong. =) And changing the color of the entire application menu would be very nice if I could do this too. I tried to override OnPaint, but it didn't work... I could use some samples of code, since I seem to be doing something wrong when I don't get it to work. =) I heard something about "changeing the thumb and track colors using custom draw." how is this done in code? Thanks, /Fredrik

    J 1 Reply Last reply
    0
    • F Fredrik

      Hello! I have been trying to set the color of a slider I created with MFC. I managed to color it's background but didn't manage to change the slider "knob" or "path" color, how is this done? I also have a Combobox wich I would like to change the color of as well, but it didn't work out either. I tried to check the "owner drawn and with strings on the Combobox, but I still couldn't change the colors and over the text was the picture of my icon, hmm... Then there's the frame of the window, I beieve I should override OnNcPaint() function for this but either I'm wrong or doig it wrong. =) And changing the color of the entire application menu would be very nice if I could do this too. I tried to override OnPaint, but it didn't work... I could use some samples of code, since I seem to be doing something wrong when I don't get it to work. =) I heard something about "changeing the thumb and track colors using custom draw." how is this done in code? Thanks, /Fredrik

      J Offline
      J Offline
      Jeremy Davis
      wrote on last edited by
      #2

      Try http://www.codeproject.com/miscctrl/cfctrl.asp Not exactly what you want, but you could work from here... HTH Jerry

      F 1 Reply Last reply
      0
      • J Jeremy Davis

        Try http://www.codeproject.com/miscctrl/cfctrl.asp Not exactly what you want, but you could work from here... HTH Jerry

        F Offline
        F Offline
        Fredrik
        wrote on last edited by
        #3

        Thanks, that helped with the colors in the ComboBox, but my real problem is the color of the little thin line around the ComboBox and the little arrow for klicking on the combobox to bring down the choices in it. Does anyone know how to override the dialog from getting these colors from the system and how to set them? I have tried a lot of things but none seems to work. Also, how to paint the frame of the dialog window and how to override the menu colors, not just the fields in the menu, but I want contol over the whole menu and what color it has. I really need help with this, this problem is really killing me! :)

        J 1 Reply Last reply
        0
        • F Fredrik

          Thanks, that helped with the colors in the ComboBox, but my real problem is the color of the little thin line around the ComboBox and the little arrow for klicking on the combobox to bring down the choices in it. Does anyone know how to override the dialog from getting these colors from the system and how to set them? I have tried a lot of things but none seems to work. Also, how to paint the frame of the dialog window and how to override the menu colors, not just the fields in the menu, but I want contol over the whole menu and what color it has. I really need help with this, this problem is really killing me! :)

          J Offline
          J Offline
          Jeremy Davis
          wrote on last edited by
          #4

          Simple just paint over it! Have a look here... http://www.codeproject.com/combobox/combobox\_flatcombo.asp HTH Jerry

          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