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