Windows 7对话框更新不同 [英] Windows 7 Dialog Update Different

查看:155
本文介绍了Windows 7对话框更新不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个对话框,用OnInitDialog中的绘图缩略图更新静态控件。这在Windows XP上运行正常,但在Windows 7上初始更新失败。这里有什么变化吗?一旦在Windows 7上显示对话框,任何更新都会导致缩略图正确重绘,但第一个失败...





编辑:



进一步的调查显示,如果我切换到''经典''主题,Windows 7上的''Aero'主题会导致问题,问题就消失了。



知道如何处理吗?





编辑2:



我认为DWM以某种方式与屏幕同步,但

我不能找到任何方法让DWM在打开对话框时动作,也许我需要查看DWM api ...



干杯

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...




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

推荐答案

我遇到了一个与Windows Color Management有关的类似问题。请检查此讨论 [ ^ ]如何设置正确的颜色配置文件(适用于Windows)照片查看器,但也会影响其他程序)
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)


黑客修复:在对话框打开后,我使用计时器小幅运行刷新代码。它像罪一样丑陋,但它有效。我没有时间弄清楚Windows的行为!
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!


是否创建了静态控件????
does the static control is created ????


这篇关于Windows 7对话框更新不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆