troubleshooting Question

CClientDC drawing over child controls.

Avatar of twgoodman
twgoodman asked on
System ProgrammingC++
5 Comments2 Solutions1588 ViewsLast Modified:
Hey guys,

I have a desire to draw gradient rectangles over the regions of child controls under certain situations such as when the user enters invalid data. Basically, I'm implementing a more visual and less annoying means of doing DDV.

My problem currently is that I can not actually draw over the regions of child controls. My clip rectangle for the DC excludes these regions. I've been trying to use the ::ExtSelectClipRgn and related Win32 functions to achieve the effect of temporarily adding in the region of the child control into the region associated with the parent (CMFCPropertyPage derived class) DC so I can do my drawing. Anyone have any suggestions ?

Personally,  I would prefer to avoid the transparent window idea. It just seems more trouble that should be needed to do what I want. The mouse event issues ect.
ASKER CERTIFIED SOLUTION
JohnGaby

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros