在onSize一起改变对话框指定控件的位置和大小,譬如拉大listctrl,移动button紧贴右下角。
在显示属性设置了“移动窗口时显示窗口内容”后,为了避免界面的闪烁,我重载了OnEraseBkgnd 如下:BOOL CResourceDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
RECT rcCtrl = {0};
CWnd* pwndCtrl = GetWindow(GW_CHILD);
while(pwndCtrl)
{
if(IsWindow(pwndCtrl->m_hWnd)&&pwndCtrl->IsWindowVisible())
{
pwndCtrl->GetWindowRect(&rcCtrl);
ScreenToClient(&rcCtrl);
pDC->ExcludeClipRect(&rcCtrl);
}
pwndCtrl = pwndCtrl->GetNextWindow();
}
return CDialog::OnEraseBkgnd(pDC);
}在win2000下运行正常,在 xp的经典主题下也正常,但在xp的xp效果主题下发现对话框中的button没有重绘,成了小黑框。
请大家指点,谢谢!
在显示属性设置了“移动窗口时显示窗口内容”后,为了避免界面的闪烁,我重载了OnEraseBkgnd 如下:BOOL CResourceDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
RECT rcCtrl = {0};
CWnd* pwndCtrl = GetWindow(GW_CHILD);
while(pwndCtrl)
{
if(IsWindow(pwndCtrl->m_hWnd)&&pwndCtrl->IsWindowVisible())
{
pwndCtrl->GetWindowRect(&rcCtrl);
ScreenToClient(&rcCtrl);
pDC->ExcludeClipRect(&rcCtrl);
}
pwndCtrl = pwndCtrl->GetNextWindow();
}
return CDialog::OnEraseBkgnd(pDC);
}在win2000下运行正常,在 xp的经典主题下也正常,但在xp的xp效果主题下发现对话框中的button没有重绘,成了小黑框。
请大家指点,谢谢!
Manifests
Manifests are XML files that accompany and describe side-by-side assemblies or isolated applications. Manifests uniquely identify the assembly through the assembly's <assemblyIdentity> element. They contain information used for binding and activation, such as COM classes, interfaces, and type libraries, that has traditionally been stored in the registry. Manifests also specify the files that make up the assembly and may include Windows classes if the assembly author wants them to be versioned. Side-by-side assemblies are not registered on the system, but are available to applications and other assemblies on the system that specify dependencies in manifest files.
On Windows XP, manifest files enable administrators and applications to manage side-by-side assembly versions after deployment. Every side-by-side assembly must have a manifest associated with it. The installation of Windows XP installs the supported Microsoft side-by-side assemblies with their manifests. If you develop your own side-by-side assemblies, you must also install manifest files. For more information, see Installing Side-by-Side Assemblies and Manifest Files Reference.Manifests and configuration files are not localized.The following types of manifests are used with side-by-side assemblies:
Assembly manifests describe side-by-side assemblies. They are used to manage the names, versions, resources, and dependent assemblies of side-by-side assemblies. The manifests of shared assemblies are stored in the WinSxS folder of the system. Private assembly manifests are stored either as a resource in the DLL or in the application folder
Application manifests describe isolated applications. They are used to manage the names and versions of shared side-by-side assemblies that the application should bind to at run time. Application manifests are copied into the same folder as the application executable file or included as a resource in the application's executable file.
Application Configuration Files, are manifests used to override and redirect the versions of dependent assemblies used by side-by-side assemblies and applications.
Publisher Configuration Files, are manifests used to redirect the version of a side-by-side assembly to another compatible version. The version that the assembly is being redirected to should have the same major.minor values as the original version.
1、Win2000, .net 2003 C++下开发
2、在 OnEraseBkgnd中ExcludeClipRect对话框中所有Visiable子窗口区域
3、在XP下运行,系统采用XP效果主题,程序使用manifest文件达到XP Style
if(IsWindow(pwndCtrl->m_hWnd) && pwndCtrl->IsWindowVisible() && (!(pwndCtrl->SendMessage(WM_GETDLGCODE)&(DLGC_BUTTON|DLGC_STATIC))))
不会出现黑框的现象,但所有的button和static及group-box都出现了闪烁。
暂时结贴,学习一下在问。