Click here to Skip to main content
16,015,583 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detect event again ;( Pin
Joel Lucsy5-Mar-03 7:14
Joel Lucsy5-Mar-03 7:14 
GeneralRe: Detect event again ;( Pin
jeremysay5-Mar-03 7:51
jeremysay5-Mar-03 7:51 
GeneralRe: Detect event again ;( Pin
jeremysay5-Mar-03 8:47
jeremysay5-Mar-03 8:47 
GeneralDDEML Pin
Anthony98875-Mar-03 4:58
Anthony98875-Mar-03 4:58 
QuestionPop up text upon a static control? Pin
mickelthepickle5-Mar-03 4:54
mickelthepickle5-Mar-03 4:54 
AnswerRe: Pop up text upon a static control? Pin
Roger Allen5-Mar-03 5:10
Roger Allen5-Mar-03 5:10 
GeneralRe: Pop up text upon a static control? Pin
mickelthepickle5-Mar-03 5:21
mickelthepickle5-Mar-03 5:21 
GeneralRe: Pop up text upon a static control? Pin
Roger Allen5-Mar-03 6:17
Roger Allen5-Mar-03 6:17 
I wouldn;t bother with the tooltip control. If your doing this on a dialog, follow these steps (which work on form views etc as well).

1. Call EnableToolTips(TRUE) in the OnInit dialog.
2. Add the function prototype
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT * pResult);

3. Add this MESSAGE_MAP entry
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)

4. Add your funtion
BOOL CYourDialog::OnToolTipNotify(UINT /*id*/, NMHDR *pNMHDR, LRESULT * /*pResult*/)
{
    TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
	static char tooltiptext[256] = "";
	
    if (pTTT->uFlags & TTF_IDISHWND)
    {
        // idFrom is actually the HWND of the tool
        UINT nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
		
		pTTT->lpszText = NULL;
		
		switch (nID)
		{
// one entry for every control that needs a tooltip
		case IDC_TITLE :
			pTTT->lpszText = "Tray setup title";
			break;
		}
		
		if (pTTT->lpszText != NULL)
		{
			return(TRUE);
		}
	}
	
	return(FALSE);
}


Then just write your tooltips text for each control.


Roger Allen
Sonork 100.10016

Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
GeneralNeed reliable start of line CharIndex Pin
brianwelsch5-Mar-03 4:44
brianwelsch5-Mar-03 4:44 
GeneralRe: Need reliable start of line CharIndex - DONE Pin
brianwelsch10-Mar-03 7:27
brianwelsch10-Mar-03 7:27 
GeneralStop message processing of a process Pin
Dominik Reichl5-Mar-03 4:29
Dominik Reichl5-Mar-03 4:29 
GeneralRe: Stop message processing of a process Pin
jmkhael5-Mar-03 7:18
jmkhael5-Mar-03 7:18 
GeneralRe: Stop message processing of a process Pin
Joel Lucsy5-Mar-03 7:18
Joel Lucsy5-Mar-03 7:18 
GeneralActiveX control Pin
Dennis L5-Mar-03 4:15
Dennis L5-Mar-03 4:15 
GeneralRe: ActiveX control Pin
Cedric Moonen5-Mar-03 21:33
Cedric Moonen5-Mar-03 21:33 
QuestionWhat is VC++ 6 equivalent of VB's DoEvents Pin
Mahesh Perumal4-Mar-03 17:53
Mahesh Perumal4-Mar-03 17:53 
AnswerRe: What is VC++ 6 equivalent of VB's DoEvents Pin
Nick Parker4-Mar-03 19:06
protectorNick Parker4-Mar-03 19:06 
GeneralRe: What is VC++ 6 equivalent of VB's DoEvents Pin
Steve S5-Mar-03 5:46
Steve S5-Mar-03 5:46 
AnswerRe: What is VC++ 6 equivalent of VB's DoEvents Pin
Alvaro Mendez5-Mar-03 8:57
Alvaro Mendez5-Mar-03 8:57 
GeneralRe: What is VC++ 6 equivalent of VB's DoEvents Pin
Mahesh Perumal5-Mar-03 19:36
Mahesh Perumal5-Mar-03 19:36 
QuestionHow to open a web site? Pin
Nguyen Huynh Hung4-Mar-03 17:23
Nguyen Huynh Hung4-Mar-03 17:23 
AnswerRe: How to open a web site? Pin
Taka Muraoka4-Mar-03 17:34
Taka Muraoka4-Mar-03 17:34 
AnswerRe: How to open a web site? Pin
Dave Bryant4-Mar-03 17:40
Dave Bryant4-Mar-03 17:40 
AnswerRe: How to open a web site? Pin
KingsGambit4-Mar-03 17:43
KingsGambit4-Mar-03 17:43 
QuestionHow to minimize window of application into icon on taskbar? Pin
Nguyen Huynh Hung4-Mar-03 17:14
Nguyen Huynh Hung4-Mar-03 17:14 

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.