反了!
应该是:
sheet.m_psh.dwFlags &= ~(PSH_HASHELP);
不是:
sheet.m_psh.dwFlags ^= PSH_HASHELP;Help in CPropertySheet is supported by the F1 key and the Help button only. The Help button appears in the application framework by default. No intervention by the user is necessary. When the user adds the help information for each of the pages inside the property sheet, the help mechanism automatically displays the help for that page when the Help button is clicked.You can deactivate the Help button capability by modifying m_psh in the property sheet object as follows:mySheet.m_psh.dwFlags &= ~(PSH_HASHELP);You can activate the Help button again with the following:mySheet.m_psh.dwFlags |= PSH_HASHELP;The m_psh variable is of type PROPSHEETPAGE. The dwFlags field of m_psh determines if the Help button of the property sheet (the parent of the property page) is enabled or disabled.