Click here to Skip to main content
15,919,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hiding a console app Pin
toxcct31-May-07 4:28
toxcct31-May-07 4:28 
GeneralRe: hiding a console app Pin
Rage31-May-07 5:22
professionalRage31-May-07 5:22 
GeneralRe: hiding a console app Pin
toxcct31-May-07 5:24
toxcct31-May-07 5:24 
GeneralRe: hiding a console app Pin
Matthew Faithfull31-May-07 5:04
Matthew Faithfull31-May-07 5:04 
GeneralRe: hiding a console app Pin
Rage31-May-07 5:22
professionalRage31-May-07 5:22 
GeneralRe: hiding a console app Pin
Matthew Faithfull31-May-07 5:49
Matthew Faithfull31-May-07 5:49 
GeneralRe: hiding a console app Pin
tom groezer31-May-07 5:24
tom groezer31-May-07 5:24 
QuestionDisplaying help popup under the control in VC++ Pin
Merryla Martina31-May-07 3:49
Merryla Martina31-May-07 3:49 
Hi All,

I have created an application in vc++ using the Appwizard with some dialog in it but without help support.
Now I am in need of providing help msg for the controls in the dialog.So later added support for the help.
Somehow managed to provide the help popup using WinHelp.

Currently I am able to get the help popup message at the cursor position .
But I need to display it near the control, not at the cursor position.


FYI The code looks like this

//InputDialog.h

afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);


//InputDialog.cpp

BEGIN_MESSAGE_MAP(InputDialog, CDialog)
ON_WM_HELPINFO()
END_MESSAGE_MAP()

BOOL InputDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
// TODO: Add your message handler code here and/or call default

CRect Rect;
CPoint XPoint,YPoint,CtrlPoint;

CWnd* pControl = GetDlgItem( pHelpInfo->iCtrlId );

//Get the coordianate of the control -Example Radio button in the Dialog

pControl->GetClientRect(&Rect);
pControl->ClientToScreen(&Rect);

XPoint=Rect.TopLeft();
YPoint=Rect.BottomRight();

CtrlPoint.x = XPoint.x;
CtrlPoint.y = YPoint.y;

//Assign the control coordinate to the mouse Position
pHelpInfo->MousePos = CtrlPoint;

DWORD dwContextID = pControl->GetWindowContextHelpId();


//Only proceed if it's not a static control
if (cControlID != 65535) //65535 is IDC_STATIC
{
AfxGetApp()->WinHelp( dwContextID ,HELP_CONTEXTPOPUP);
}

return CDialog::OnHelpInfo(pHelpInfo);
}



Also, I am not sure whether the GetClientRect together with ClientToScreen returns the control screen coordinate.

Please, can anybody help me ?











Thanks
Martina
QuestionTranslateAccelerator doubt Pin
tom groezer31-May-07 3:36
tom groezer31-May-07 3:36 
AnswerRe: TranslateAccelerator doubt Pin
toxcct31-May-07 3:40
toxcct31-May-07 3:40 
AnswerRe: TranslateAccelerator doubt Pin
Rajkumar R1-Jun-07 2:54
Rajkumar R1-Jun-07 2:54 
JokeRe: CString::Format Pin
toxcct31-May-07 3:20
toxcct31-May-07 3:20 
GeneralRe: CString::Format Pin
Rajesh R Subramanian31-May-07 3:44
professionalRajesh R Subramanian31-May-07 3:44 
GeneralRe: CString::Format Pin
Mark Salsbery31-May-07 7:15
Mark Salsbery31-May-07 7:15 
QuestionSyntax Pin
tom groezer31-May-07 3:06
tom groezer31-May-07 3:06 
AnswerRe: Syntax Pin
Rajesh R Subramanian31-May-07 3:14
professionalRajesh R Subramanian31-May-07 3:14 
GeneralRe: Syntax Pin
toxcct31-May-07 3:27
toxcct31-May-07 3:27 
AnswerRe: Syntax Pin
Roger Stoltz31-May-07 3:20
Roger Stoltz31-May-07 3:20 
GeneralRe: Syntax Pin
Rajesh R Subramanian31-May-07 3:23
professionalRajesh R Subramanian31-May-07 3:23 
GeneralRe: Syntax Pin
Roger Stoltz31-May-07 3:27
Roger Stoltz31-May-07 3:27 
GeneralRe: Syntax Pin
jhwurmbach31-May-07 4:29
jhwurmbach31-May-07 4:29 
GeneralRe: Syntax Pin
Roger Stoltz31-May-07 4:39
Roger Stoltz31-May-07 4:39 
GeneralRe: Syntax Pin
jhwurmbach31-May-07 4:45
jhwurmbach31-May-07 4:45 
QuestionRe: Syntax Pin
David Crow31-May-07 5:08
David Crow31-May-07 5:08 
AnswerRe: Syntax Pin
jhwurmbach31-May-07 5:13
jhwurmbach31-May-07 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.