BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
ShowWindow(SW_HIDE);
CRect dlgRect;
GetClientRect(&dlgRect);
CPoint centerPoint;
centerPoint.x=dlgRect.Width()/2;
centerPoint.y=dlgRect.Height()/2;
// 取得对话框的中点坐标
CRgn testrgn;
this->ShowWindow(SW_HIDE);
int m=GetSystemMetrics(SM_CYSIZEFRAME);
//动态显示弹出的对话框
for (int i=10;i<dlgRect.Width()/2+2*m;i+=1);
{
testrgn.CreateRectRgn(centerPoint.x-i,centerPoint.y-i,centerPoint.x+i,centerPoint.y+i);
SetWindowRgn((HRGN) testrgn,TRUE);
ShowWindow(SW_SHOW);
CenterWindow();
testrgn.DeleteObject();
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
为什么不能实现宣称的,动态对话框!
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
ShowWindow(SW_HIDE);
CRect dlgRect;
GetClientRect(&dlgRect);
CPoint centerPoint;
centerPoint.x=dlgRect.Width()/2;
centerPoint.y=dlgRect.Height()/2;
// 取得对话框的中点坐标
CRgn testrgn;
this->ShowWindow(SW_HIDE);
int m=GetSystemMetrics(SM_CYSIZEFRAME);
//动态显示弹出的对话框
for (int i=10;i<dlgRect.Width()/2+2*m;i+=1);
{
testrgn.CreateRectRgn(centerPoint.x-i,centerPoint.y-i,centerPoint.x+i,centerPoint.y+i);
SetWindowRgn((HRGN) testrgn,TRUE);
ShowWindow(SW_SHOW);
CenterWindow();
testrgn.DeleteObject();
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
为什么不能实现宣称的,动态对话框!
解决方案 »
- VS2010中 提示error LNK2019: 无法解析的外部符号 !!!
- WinDBG看不到堆栈信息
- 关于InvalidateRect(Rect, FALSE)的问题高分请教!(关于《beginning VC++2005》一书的例子)
- 请问怎样在CRichEditCtrl中输出Tab长度等于四个空格长度?
- 请问,有没有查看进程中的所有字符串资源的软件?
- 用opengl显示3ds模型文件后,如何在屏幕上鼠标获取某一点的三维坐标信息?
- 小弟建议:请在座的众高手照顾一下初学者和E文不佳者,解答时请尽量不要粘贴MSDN上的原文,谢谢.(同意并支持者请up)
- win98能安装,window 2000 professional装不上?
- 大家来看看这段代码??
- 求教一个简单,但却紧急的问题!!!
- MSDN上搜 Hierarchy Chart。 frame 不是 view 的基类,他们都是 cwnd 的子类。 所以不解,结果为什么一样?
- 如何改变派生于CControlBar的大小
晕,这句后面的分号去掉!