Help with colors in MFC, damn I'm bad at painting :)
-
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
-
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
Try http://www.codeproject.com/miscctrl/cfctrl.asp Not exactly what you want, but you could work from here... HTH Jerry
-
Try http://www.codeproject.com/miscctrl/cfctrl.asp Not exactly what you want, but you could work from here... HTH Jerry
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! :)
-
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! :)
Simple just paint over it! Have a look here... http://www.codeproject.com/combobox/combobox\_flatcombo.asp HTH Jerry