重载CPropertySheet类,在它的OnInitDialog函数中添加
//向导模式下ID_WIZNEXT,ID_WIZFINISH, ID_WIZBACK, IDCANCEL 

int ids [] = ...{ID_WIZBACK ,ID_WIZNEXT, IDCANCEL};//, ID_APPLY_NOW, IDHELP };
CRect rectBtn,rectDlg;
int nSpacing = 6; // space between two buttons...
for( int i =0; i < sizeof(ids)/sizeof(int); i++)
...{
GetDlgItem (ids[i])->GetWindowRect (rectBtn);
ScreenToClient (&rectBtn);
int btnWidth = rectBtn.Width();
// rectBtn.left = rectBtn.left + (btnWidth + nSpacing)* 2;
// rectBtn.right = rectBtn.right + (btnWidth + nSpacing)* 2;
rectBtn.left = rectBtn.left + btnWidth+10;
rectBtn.right = rectBtn.right + btnWidth+10;
GetDlgItem (ids [i])->MoveWindow(rectBtn);
if(i == 1)
GetDlgItem(ID_WIZFINISH)->MoveWindow(rectBtn);
}
GetDlgItem(IDHELP)->ShowWindow(SW_HIDE); 

去掉帮助按钮,上一步,下一步,取消统一向右移动。
1250

被折叠的 条评论
为什么被折叠?



