Solved

Draw parent pixel on a Control Client Area

Posted on 2002-07-14
8
227 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
Comment Utility
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
Comment Utility
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 30

Expert Comment

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

Author Comment

by:raqadi
Comment Utility
mr Zoppo, do you mean that the background of my control Appears on those corners ??
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 30

Accepted Solution

by:
Zoppo earned 100 total points
Comment Utility
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 30

Expert Comment

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

Author Comment

by:raqadi
Comment Utility
Thanx Zoppo; my dear :0).

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

Expert Comment

by:Zoppo
Comment Utility
You're welcome,

I'm glad that I could help you :)

havea nice day,

regards,

ZOPPO
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

18 Experts available now in Live!

Get 1:1 Help Now