Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a dialog that updates a static control with a drawing thumbnail in OnInitDialog. This works fine on Windows XP but the initial update fails on Windows 7. Has something changed here? Once the dialog is displayed on Windows 7, any updates cause the thumbnail to redraw properly, but the first one fails...


Edit:

Further investigation reveals that it is 'Aero' theme on Windows 7 causing the problem, if I switch to the 'Classic' theme, the problem goes away.

Any idea how to handle that?


Edit 2:

I think the DWM is getting out of synce with the screen in some fashion, but
I can't find any way to kick the DWM into action on opening the dialog, perhaps I need to look through the DWM api...

Cheers
Posted
Updated 10-Dec-12 18:27pm
v4
Comments
Eugen Podsypalnikov 11-Dec-12 2:09am    
// but the first one fails...
What code is it ? :)

I had a similar problem that was somehow related to the Windows Colour Management. Please check this discussion[^] on how to set the correct Colour Profile (applies to Windows Photo Viewer, but will affect other programs as well)
 
Share this answer
 
Hack fix: I used a timer to run my refresh code fractionally after the dialog opens. It's ugly as sin but it works. I don't have time to figure out Windows behaviour!
 
Share this answer
 
does the static control is created ????
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900