TO Areslee(易水) : 我在最上面一層中已經加了! pHelpWnd->ShowWindow(SW_HIDE);
this will help uWhen the property sheet shows up, by default it has the Apply button visible and disabled. Often, we don't need the Apply button at all. Removing the button is a one liner and here's how. After you create the property sheet object just add the PSH_NOAPPLYNOW flag. propsheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
: CPropertySheet(IDS_XXX_DEFAULT, pWndParent),
{
//-1. Remove the Apply Button, Help Button;
m_psh.dwFlags |= PSH_NOAPPLYNOW;
m_psh.dwFlags &= ~PSH_HASHELP;
...
}
{
//{{AFX_DATA_INIT(CMyPropertyPage1)
//}}AFX_DATA_INIT
m_psp.dwFlags &= ~PSP_HASHELP; //去掉属性页的“帮助”按钮
}
每一个页面都要加。
if( pHelpWnd != NULL )
{
pHelpWnd->ShowWindow(SW_HIDE);
// move the IDCANCEL button to IDHELP button position.
{
CWnd * pWnd1 = GetDlgItem(IDHELP);
CWnd * pWnd2 = GetDlgItem(IDCANCEL);
RECT r1,r2;
pWnd1->GetWindowRect(&r1);
pWnd2->MoveWindow(&r1);
pWnd1->GetClientRect(&r2);
pWnd2->GetWindowRect(&r2);
RECT r3;
int cx, cy;
cy = r2.top - r1.top;
cx = r2.left - r1.left;
r3.top = r1.top - cy;
r3.bottom = r1.bottom - cy;
r3.left = r1.left - cx;
r3.right= r1.right- cx;
pWnd2->MoveWindow(&r3);
}
}
pWnd2->MoveWindow(&r3);
之后加上:
pWnd1->ShowWindow(SW_HIDE);
会更好
我在最上面一層中已經加了!
pHelpWnd->ShowWindow(SW_HIDE);
propsheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;