Problem with SetLayeredWindowAttribute
-
I've got problem with SetLayeredWindowAttribute, ever since I had set it, it wouldn't receive WM_PAINT anymore. But I have critical code in WM_PAINT. How to get WM_PAINT again while having SetLayeredWindowAttributes called?
-
I've got problem with SetLayeredWindowAttribute, ever since I had set it, it wouldn't receive WM_PAINT anymore. But I have critical code in WM_PAINT. How to get WM_PAINT again while having SetLayeredWindowAttributes called?
I've just done a quick search, and found the following msdn article: http://msdn.microsoft.com/en-us/library/ms997507.aspx[^] Have look at the "Layered Windows" paragraph, specifically the line: "This is because SetLayeredWindowAttributes turns on the redirection of the window's drawing..." I realised it would be hard to experiment with a "real" application - but if I am having trouble, I always make a simple small application to work with, and make changes on. Once you understand how to make your small application that does nothing more that show a small red rectangle on the screen with varying transparency (for example), then you can make educated changes to your real application. Good luck! Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
-
I've just done a quick search, and found the following msdn article: http://msdn.microsoft.com/en-us/library/ms997507.aspx[^] Have look at the "Layered Windows" paragraph, specifically the line: "This is because SetLayeredWindowAttributes turns on the redirection of the window's drawing..." I realised it would be hard to experiment with a "real" application - but if I am having trouble, I always make a simple small application to work with, and make changes on. Once you understand how to make your small application that does nothing more that show a small red rectangle on the screen with varying transparency (for example), then you can make educated changes to your real application. Good luck! Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
Thanks Iain.Your reply is of real help. I agree that we should always test a unknown technique within a small application that has all focus on it.