Visual C 中对话框窗口的有效重叠6
您好,我有子窗口重叠的问题,我创建了一个带有菜单驱动界面的软件(IDR_MAINFRAME - CFormView
等),单击其中一个菜单项后,会出现另一个子窗口(基于对话框),我在其中进行计算现在
,如果我打开任何其他条目,比如菜单条目中的度量转换,那么在与任何其他此类
窗口重叠时,背景窗口会严重变形,如果我随机移动计算器或度量转换计算器,
它们会得到毁容了,一团糟。我还在背景上放了一个位图图像。移动计算器时,背景图像也 被删除。
请让我知道如何处理这个问题。我用谷歌搜索并发现处理绘画消息或 WM_ERASEBKGND 有帮助..但我
已经尝试过这段代码,它对 OnEraseBkGnd() 没有帮助;
BOOL COfficesoftDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
CRect Rect;
GetClientRect(Rect);
//ClientToScreen(&Rect);
//this->ScreenToClient(&Rect);
this->InvalidateRect(Rect);
return CDialog::OnEraseBkgnd(pDC);
}
我如何在我的项目中实现不同窗口的平滑重叠,例如记事本重叠word文档甚至计算器甚至VC6
IDE。 请用例子解释一下。我只是一个新手,我需要详细了解......谢谢和问候
Hello there I have issue with overlapping of child windows,I have created a software with menu driven interface( IDR_MAINFRAME - CFormView
etc) and upon clicking one of the menu items another child-window appears( Dialog based ) where I do the calculations as a normal
calculator.Now if I open any other entry say conversion of metrics which is also in menu entry then on overlapping with any other such
window the background windows gets horribly disfigured and if i move about the calculator or the metrics conversion calculator randomly
they get disfigured and its a mess.Also I have put up a bitmap image on the background.Upon moving the calculator the background image also
gets erased.
Please let me know about how to handle this issue.I have googled and found that handling of paint messages or WM_ERASEBKGND helps ..but I
have tried this piece of code which just doesn't help in OnEraseBkGnd();
BOOL COfficesoftDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
CRect Rect;
GetClientRect(Rect);
//ClientToScreen(&Rect);
//this->ScreenToClient(&Rect);
this->InvalidateRect(Rect);
return CDialog::OnEraseBkgnd(pDC);
}
how can i achieve the smooth overlapping of different windows like a notepad overlapping a word document or even a calculator or even a VC6
IDE in my project.
Please explain it with an example .I am just a newbie and I need to understand in detail...thanks and regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)