Solved

Draw parent pixel on a Control Client Area

Posted on 2002-07-14
8
243 Views
Last Modified: 2013-11-20
i want to make some pixels transparent on my control, i need to do that by drawing the parent's pixels that lies behind the intended pixel on the control instread of it ( instead of the pixels on the controls), so how can i do that without setting the control window style to WS_EX_TRANSPARENT  ??
0
Comment
Question by:raqadi
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:fl0yd
ID: 7152761
You cannot -- there is no way to find out for sure what a specific pixel should be if a window obscuring it wasn't there. It is there and thus the OS doesn't care about what it WOULD be otherwise. Why are you so opposed to using the way to go (i.e. use WS_EX_TRANSPARENT)?
0
 

Author Comment

by:raqadi
ID: 7153494
The problem is that im drawing my control using RoundRect function, but the corners of the control rectangle that will remains out of the rounded rectangle still have a color, i want these corners to be removed, and i dont find any way to do that...!!
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 7153723
Maybe you need to override WM_ERASEBKGND message to avoid the enclosing rectangle is filled with background color.
0
 

Author Comment

by:raqadi
ID: 7153736
mr Zoppo, do you mean that the background of my control Appears on those corners ??
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 7153764
Well, I guess so ... BTW, I found another interesting thing.
Take a look at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q125669

There it's stated that one should use SetWindowRgn() to create
none-rectangular windows. Try this first.
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 7153767
BTW, there's no need to call me 'mr' :o)
(only makes me feeling old)
0
 

Author Comment

by:raqadi
ID: 7153807
Thanx Zoppo; my dear :0).

im soo happy now, and you are the cause.
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 7153814
You're welcome,

I'm glad that I could help you :)

havea nice day,

regards,

ZOPPO
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now