Disabling the help button on a property sheet
Eric J.A. Bryant -- ejab@village.ios.com Thursday, December 05, 1996 Environment: VC++4.0/WinNT4.0 Hello all, I simply wish to disable the help button on a property sheet. I have attempted to used the following in the OnInitDialog() function of the CPropertySheet: m_psp.dwFlags ^= PSP_HASHELP; it worked for elimiating the APPLY button, so i am stumped. Thanks in advance. Eric J. Bryant InterWorld Technology Ventures Senior Support Engineer
Rob Warner -- rhwarner@southeast.net Sunday, December 08, 1996 [Mini-digest: 4 responses] Style bits need to be set for your property sheet *and* your property pages. Check the docs on m_psp and m_psh. <<<<<>>>>> Rob Warner rhwarner@southeast.net http://users.southeast.net/~rhwarner ---------- > From: Eric Bryant> To: 'mfc-l@netcom.com' > Subject: Disabling the help button on a property sheet > Date: Thursday, December 05, 1996 1:45 PM > > Environment: VC++4.0/WinNT4.0 > > Hello all, > > I simply wish to disable the help button on a property sheet. > I have attempted to used the following in the OnInitDialog() function of > the CPropertySheet: > > m_psp.dwFlags ^= PSP_HASHELP; > > it worked for elimiating the APPLY button, so i am stumped. Thanks in > advance. > > Eric J. Bryant > InterWorld Technology Ventures > Senior Support Engineer > -----From: "P.J. Tezza" Eric, To remove the Help button, make sure than nothing is handling the = ID_HELP command. For an AppWizard generated application, comment out the = line as shown in the code below in your CWinApp's message map: // CSetupApp BEGIN_MESSAGE_MAP(CSetupApp, CWinApp) //{{AFX_MSG_MAP(CSetupApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG // No help file written yet. Uncomment when help file is written. // ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() As I remember from grunging around in the MFC property sheet source = code, MFC sets the PSP_HASHELP flag if there is a message handler and = ignore your setting. PJ pj@exemplarsoftware.com -----From: John Howard Robertson I disable the help button prior to calling the domodal() function: e.g. propsheet->m_psh.dwFlags &= ~(PSH_HASHELP); ---------- From: Eric Bryant[SMTP:ejab@village.ios.com] Sent: Thursday, December 05, 1996 7:45 AM To: 'mfc-l@netcom.com' Subject: Disabling the help button on a property sheet Environment: VC++4.0/WinNT4.0 Hello all, I simply wish to disable the help button on a property sheet. I have attempted to used the following in the OnInitDialog() function of the CPropertySheet: m_psp.dwFlags ^= PSP_HASHELP; it worked for elimiating the APPLY button, so i am stumped. Thanks in advance. Eric J. Bryant InterWorld Technology Ventures Senior Support Engineer -----From: Charlie Way I did this by deriving a class from CPropertyPage, overriding OnCreate(), as follows: int CMyPropertySheet::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CPropertySheet::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here ((CWnd*)GetDlgItem(ID_APPLY_NOW))->ShowWindow(SW_HIDE); ((CWnd*)GetDlgItem(ID_HELP))->ShowWindow(SW_HIDE); return 0; } I needed to derive my own class from CPropertyPage for other reasons, so this was a convenient way to do it. I'm sure there are others... -charlie way > ---------- > From: Eric Bryant[SMTP:ejab@village.ios.com] > Sent: Thursday, December 05, 1996 8:45 AM > To: 'mfc-l@netcom.com' > Subject: Disabling the help button on a property sheet > > Environment: VC++4.0/WinNT4.0 > > Hello all, > > I simply wish to disable the help button on a property sheet. > I have attempted to used the following in the OnInitDialog() function of > the CPropertySheet: > > m_psp.dwFlags ^= PSP_HASHELP; > > it worked for elimiating the APPLY button, so i am stumped. Thanks in > advance. > > Eric J. Bryant > InterWorld Technology Ventures > Senior Support Engineer
| Вернуться в корень Архива |