Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUpdate the Window.. Pin
gothic_coder12-Nov-08 23:57
gothic_coder12-Nov-08 23:57 
AnswerRe: Update the Window.. Pin
SandipG 13-Nov-08 1:12
SandipG 13-Nov-08 1:12 
GeneralRe: Update the Window.. Pin
gothic_coder13-Nov-08 3:23
gothic_coder13-Nov-08 3:23 
QuestionRe: Update the Window.. Pin
bob1697213-Nov-08 16:35
bob1697213-Nov-08 16:35 
AnswerRe: Update the Window.. [modified] Pin
gothic_coder13-Nov-08 19:04
gothic_coder13-Nov-08 19:04 
QuestionRe: Update the Window.. Pin
bob1697214-Nov-08 4:18
bob1697214-Nov-08 4:18 
AnswerRe: Update the Window.. Pin
gothic_coder14-Nov-08 20:32
gothic_coder14-Nov-08 20:32 
GeneralRe: Update the Window.. Pin
bob1697215-Nov-08 8:36
bob1697215-Nov-08 8:36 
Well, I created a transparent window using WS_EX_TRANSPARENT. I downloaded the CxImage library from CodeProject. Built the libraries. Added the "us.png" file from the demo as a resource to my project, setup a WM_PAINT handler, dropped in your code snippet to my OnPaint, modified it to use my CPaintDC, verified that my drawing code for the view was being obscurred by the png to demonstrate that the transparent effect was correctly being implemented. I then dragged various windows over it, and scrolled the view so the transparent window fell out of the view client area, etc...

I cannot reproduce your issue. It is invalidated correctly and the WM_PAINT is called and the image is always reproduced (i.e. No eraser effect is observed). There are some occasional remnant areas that don't get invalidated when using WS_POPUP. Are you using WS_POPUP or WS_CHILD?

It does however, flicker because of the drawing sequence inherent in using WS_EX_TRANSPARENT. This was expected as I've never found WS_EX_TRANSPARENT very useful in past attempts at using it (except for mouse pass-through).

I'm not sure how to reproduce your issue without more data. However, since I'm confident that you will probably not like the flicker you'll get once you get it all worked out, I would recommend using WS_EX_LAYERED as it is possible to get some pretty smooth results with almost no flicker. It also has a more versatile mouse pass-through effect and you can always use WS_EX_TRANSPARENT to allow mouse messages to pass through the whole window while using WS_EX_LAYERED.

Anyway, if you can give me more detail on your window creation, I might have better luck at reproducing your issue. Regardless, consider WS_EX_LAYERED instead if you can.
GeneralRe: Update the Window.. Pin
gothic_coder16-Nov-08 20:41
gothic_coder16-Nov-08 20:41 
GeneralRe: Update the Window.. Pin
gothic_coder17-Nov-08 2:40
gothic_coder17-Nov-08 2:40 
QuestionCheckBox and Static control problem Pin
Dhiraj kumar Saini12-Nov-08 23:48
Dhiraj kumar Saini12-Nov-08 23:48 
AnswerRe: CheckBox and Static control problem Pin
gothic_coder13-Nov-08 0:02
gothic_coder13-Nov-08 0:02 
GeneralRe: CheckBox and Static control problem Pin
Dhiraj kumar Saini13-Nov-08 0:05
Dhiraj kumar Saini13-Nov-08 0:05 
GeneralRe: CheckBox and Static control problem Pin
gothic_coder13-Nov-08 0:42
gothic_coder13-Nov-08 0:42 
GeneralRe: CheckBox and Static control problem Pin
Dhiraj kumar Saini13-Nov-08 1:58
Dhiraj kumar Saini13-Nov-08 1:58 
GeneralRe: CheckBox and Static control problem Pin
Iain Clarke, Warrior Programmer13-Nov-08 2:57
Iain Clarke, Warrior Programmer13-Nov-08 2:57 
GeneralRe: CheckBox and Static control problem Pin
gothic_coder13-Nov-08 3:12
gothic_coder13-Nov-08 3:12 
AnswerRe: CheckBox and Static control problem Pin
AtomAnt13-Nov-08 0:04
AtomAnt13-Nov-08 0:04 
QuestionHow can i Get Hard Drive Modal details? Pin
Le@rner12-Nov-08 21:58
Le@rner12-Nov-08 21:58 
AnswerRe: How can i Get Hard Drive Modal details? Pin
SandipG 12-Nov-08 22:24
SandipG 12-Nov-08 22:24 
AnswerRe: How can i Get Hard Drive Modal details? Pin
_AnsHUMAN_ 12-Nov-08 22:26
_AnsHUMAN_ 12-Nov-08 22:26 
AnswerRe: How can i Get Hard Drive Modal details? [modified] Pin
User 21559712-Nov-08 22:26
User 21559712-Nov-08 22:26 
QuestionHow to get disk's capacitance of remote computer with ip? Pin
ZhiLiangLin12-Nov-08 20:00
ZhiLiangLin12-Nov-08 20:00 
AnswerRe: How to get disk's capacitance of remote computer with ip? [modified] Pin
User 21559712-Nov-08 22:18
User 21559712-Nov-08 22:18 
QuestionRe: How to get disk's capacitance of remote computer with ip? Pin
David Crow13-Nov-08 3:13
David Crow13-Nov-08 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.