求助:关于对话框定位问题

quanlai2 2008-02-01 02:43:27
建立一个对话框应用程序,在对话框中添加一个按钮,在单击这个按钮时会弹出一个非模态对话框,要求这个对话框要显示在原对话框的指定位置,应该怎么做?谢谢大家!
...全文
70 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
quanlai2 2008-02-28
  • 打赏
  • 举报
回复
1
quanlai2 2008-02-28
  • 打赏
  • 举报
回复
结贴
RichardPang 2008-02-01
  • 打赏
  • 举报
回复
int cx=GetSystemMetrics(SM_CXSCREEN);
int cy=GetSystemMetrics(SM_CYSCREEN);
CRect rectWindow;
GetWindowRect(&rectWindow);
int w=rectWindow.Width();
int h=rectWindow.Height();
rectWindow.left=cx-w;
rectWindow.top=cy-h;
rectWindow.right=cx;
rectWindow.bottom=cy;
Dialog.MoveWindow(rectWindow,TRUE)
tyong 2008-02-01
  • 打赏
  • 举报
回复
SetWindowPos也可以
youyifang 2008-02-01
  • 打赏
  • 举报
回复
moveWindow()函数就做到。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧