向导对话框问题求助!

hzrenjer 2004-09-20 10:06:50
我作了个向导对话框(有四个属性页),DoModal的时候,上一步,下一步,取消三个按钮总显示在对话框的右下方,这样向导框的右边就多出了一个空白,很不好看,怎么改一下??谢啦。
...全文
81 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
hzrenjer 2004-09-23
  • 打赏
  • 举报
回复
用了Codeguru上的
Alternative Wizard Dialog
蒋晟 2004-09-21
  • 打赏
  • 举报
回复
BOOL CMySheet::OnInitDialog()
{
CPropertySheet::OnInitDialog();

RECT rc;

// resize the sheet
GetWindowRect (&rc);
ScreenToClient (&rc);
rc.right += 50;
rc.bottom += 50;
MoveWindow (&rc);

// resize the CTabCtrl
CTabCtrl* pTab = GetTabControl ();
ASSERT (pTab);
pTab->GetWindowRect (&rc);
ScreenToClient (&rc);
rc.right += 50;
rc.bottom += 50;
pTab->MoveWindow (&rc);

// resize the page
CPropertyPage* pPage = GetActivePage ();
ASSERT (pPage);
// store page size in m_PageRect
pPage->GetWindowRect (&m_PageRect);
ScreenToClient (&m_PageRect);
m_PageRect.right += 50;
m_PageRect.bottom += 50;
pPage->MoveWindow (&m_PageRect);

// move the OK, Cancel, and Apply buttons
CWnd* pWnd = GetDlgItem(IDOK);
pWnd->GetWindowRect(&rc);
rc.bottom += 50;
rc.top += 50;
ScreenToClient(&rc);
pWnd->MoveWindow(&rc);

pWnd = GetDlgItem(IDCANCEL);
pWnd->GetWindowRect(&rc);
rc.bottom += 50;
rc.top += 50;
ScreenToClient(&rc);
pWnd->MoveWindow(&rc);

pWnd = GetDlgItem(ID_APPLY_NOW);
pWnd->GetWindowRect(&rc);
rc.bottom += 50;
rc.top += 50;
ScreenToClient(&rc);
pWnd->MoveWindow(&rc);

CenterWindow();

return TRUE;
}
hzrenjer 2004-09-21
  • 打赏
  • 举报
回复
我的对话框上一步,下一步的按钮ID是什么呢?

15,976

社区成员

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

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