?
Solved

Removing Help button from a modal CPropertySheet

Posted on 1997-04-07
6
Medium Priority
?
744 Views
Last Modified: 2013-11-20
How can I remove/hide the Help button on an MFC modal CPropertySheet ?
0
Comment
Question by:kso
6 Comments
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1300916
Hi,
CPropertySheet class has PROPSHEETHEADER structure member, m_psh, which has dwflag member. You can change the PSH_HASHELP flag of this structure to show / hide the help button.
Hope this works.

0
 

Author Comment

by:kso
ID: 1300918
Hi,
Which version of MFC are you using ?
0
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1300919
You should not only exclude PSH_HASHELP flag, but also PSP_HASHELP:

PropSheet.m_psh.dwFlags &= ~PSH_HASHELP;
PropPage.m_psp.dwFlags &= ~PSP_HASHELP;
PropSheet.AddPage(&PropPage);
PropSheet.DoModal();

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:serge010697
ID: 1300920
Excluding also PSP_HASHELP does not help.
My MFC version is 4.1
0
 

Author Comment

by:kso
ID: 1300921
All tried and no luck. Well are you familiar with the Spy++ tool. You can use a similar technique in your code. Inside the property page use the following technique :

{
//GetParent() get the handle of the CPropertySheet.
//Iterate through the child windows inside CpropertySheet and
//find the window with the ID IDHELP. This can be done using
//GetWindow() or EnumChildWindows() avoid FindWindow()
//Once you have the handle for the button , use ShowWindow() //or EnableWindow().

}
0
 
LVL 4

Accepted Solution

by:
mbhakta earned 200 total points
ID: 1300922
The easiest way to do it is to override OnInitDialog() of a propertypage of the sheet and add the following:

GetParent()->GetDlgItem(IDHELP)->ShowWindow(SW_HIDE);
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question