Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CPropertySheet and context sensitive help

Posted on 1997-08-07
7
Medium Priority
?
285 Views
Last Modified: 2013-11-19
I would like to have context sensitive help in a CPropertySheet, like Word have in its options dialog.
I would like the help button to away, and instead get the little question mark in the caption of the property sheet. How do I do that?
0
Comment
Question by:roar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 1

Accepted Solution

by:
cnasarre earned 360 total points
ID: 1303291
Have you tried to OR PSP_HASHELP to the style
in the wizard constructor ?

CHardwareWizard::CHardwareWizard(CWnd* pWndParent)
   : CWizSheet(IDS_SHEET_HARDWAREITEM, pWndParent)
{
// it is a wizard !
   SetWizardMode();

// add an help button
   m_psh.dwFlags |= PSP_HASHELP;
}

0
 

Expert Comment

by:Amaresh080997
ID: 1303292
Hi roar!
 I have a suggestion.As I understand, you want to put a small "question mark" at the right top of the "PROPERTY SHEET".right? Well! PLease try the following..
1) Derive a class say "CPropSheet" from CPropertySheet as the base class.
2)Go to your "PropSheet.cpp" and add the function "OnInitDialog".
3) Call "ModifyStyleEx" function.
4) Include this "PropSheet.h" at the relevant place

I am giving the sample code below..

//The following code should go whereever u wnat to display the //property sheet

#include "PropSheet.h"
#include "MyPropPage.h"

void CMyClass::Display()
{
 CPropSheet propsheet("Sheet");
 CMyPropPage Mypage;
 propsheet.AddPage(&Mypage);
 propsheet.DoModal();// I am assuming u want to create a modal                      //sheet.If u are interested in a modeless                      //one, call "Create()" with suitable                      //arguements.
}

// The following code should go to the "PropSheet.h" file

void CPropSheet::OnInitDialog()
{
  ModifyStyleEx(0,WS_EX_CONTEXTHELP ,0);
  return CPropertySheet::OnInitDialog();
}

This will put the "?" mark on the right top.Then you have to create help IDs and map them to take the relevant help text from the .rtf file.I hope u r familiar with that.Good luck!!
Try the above solution and let me know if it works.

By the way cnasarre! I am not sure about your solution but I think the PSP_HASHELP has some thing to do with the "Help" button but not the "Question Mark" on the right top to get context sensitive help.
0
 

Author Comment

by:roar
ID: 1303293
It worked fine Amaresh. Thanks.
0
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!

 

Expert Comment

by:Amaresh080997
ID: 1303294
Hi roar!
   Thanks for your reply.Did you try my method?Which method did you use?Nice to know you got it working.
Bye.
Amaresh
0
 

Author Comment

by:roar
ID: 1303295
I made a base class CBasePropSheet, with a OnInitDialog as shown in your example, and derived all other property sheets from that one.
I think you're right when you say that PSP_HASHELP controls the help button, and not the little question mark in the caption.
Moreover, the PSP_HASHELP mentioned by cnasarre should only be used on a property page, not a property sheet. There is a style PSH_HASHELP to be used with a property sheet.
0
 

Expert Comment

by:Amaresh080997
ID: 1303296
Hi roar!
   Thanks for your reply.I was just curious to know the way you got it finally.By the way, will I get some points?:-):-):-)
bye
Amaresh
0
 

Author Comment

by:roar
ID: 1303297
Hi amaresh, do you want points? If you answer Q.8630015329, you'll get them. (The little question mark in the caption don't come when it is a wizard)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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