16,015,991 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.
JuleWst
30-Aug-12 11:19am
View
Wow, thanks a lot! The first part works perfectly for my statics. Now I still need something for check and radiobuttons. Maybe you can help with those, too? Thanks again!
Show More