Click here to Skip to main content
15,913,669 members

Comments by JuleWst (Top 6 by date)

JuleWst 31-Aug-12 7:35am View    
Thanks for offering help, when you have little time. I'm not sure I understood you 100%. To clear some things up, let me give you the dialog structure:
1. The main dialog (M)
2. The tab control with color gradient, child of M (T)
3. The page, on top of T, child of M (P)
4. Buttons, children of P (B)
Buttons and Page are supposed to have the color of the tab.
So I don't want the image of the parent, but the one of the tab, right?
And the code has to be placed in the EraseBkgd of the page?
Thanks for your encouragement :)
JuleWst 31-Aug-12 5:43am View    
it sure sounds interesting :) I have one question concerning the parent though. The parent of my controls is a child dialog and has no background, so that the tab control of the main dialog is seen through. I mentioned this in my question, I returned TRUE in OnEraseBkgnd(). I think your method won't work, since it needs the parent background. Am I right? Otherwise I will try it out and tell you what happened ;)
JuleWst 31-Aug-12 4:42am View    
I am really greatful for all your help. I can't start painting every single button though. What I'm doing happens in a super class, about 60 different dialogs work with it. So I have to keep it quite general. Resizing happens as well by the way.
JuleWst 31-Aug-12 4:11am View    
I just found out that checkboxes and radiobuttons are handled as statics with CTLCOLOR_STATIC. So I guess it's the same problem you mentioned with the read-only edit-controls. Any idea to set the background, so it fits the gradient?
JuleWst 31-Aug-12 3:09am View    
This doesn't seem to work for me :( The check and radiobuttons are still black. I thought it was necessary to call pDC->SetBkColor() in some way for all kinds of buttons. Do you agree? But I don't know what color to give, since i have a gradient background.