Click here to Skip to main content
16,008,942 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalrotating a bitmap Pin
Arrun13-Dec-04 23:55
Arrun13-Dec-04 23:55 
GeneralRe: rotating a bitmap Pin
namaskaaram14-Dec-04 0:39
namaskaaram14-Dec-04 0:39 
GeneralException in CPropertySheet::OnInitDialog() Pin
Avya13-Dec-04 23:52
Avya13-Dec-04 23:52 
GeneralRe: Exception in CPropertySheet::OnInitDialog() Pin
Antony M Kancidrowski14-Dec-04 1:12
Antony M Kancidrowski14-Dec-04 1:12 
GeneralRe: Exception in CPropertySheet::OnInitDialog() Pin
Avya15-Dec-04 21:47
Avya15-Dec-04 21:47 
GeneralDelete Temporary Internet File Pin
Rajesh_K_Sharma13-Dec-04 23:06
Rajesh_K_Sharma13-Dec-04 23:06 
GeneralRe: Delete Temporary Internet File Pin
Ravi Bhavnani14-Dec-04 0:30
professionalRavi Bhavnani14-Dec-04 0:30 
GeneralSUCCES->tooltip/groupbox Pin
V.13-Dec-04 22:59
professionalV.13-Dec-04 22:59 
Hi,

I posted a question about tooltips for controls not so long ago.
After searching and searching and searching again I found a solution so I thought I'd share with you.

Problem: The tooltips for controls in a groupbox do not show
even if you moved the position of the groupbox to the back/front (left and right Big Grin | :-D ). Nothing seemed to help.

solution: I called a TrackMouseEvent to create mouse hover messages. I handled this message in a PreTranslateMessage function. There you can determine which window called the message ... and it works!

(PS: actually I set a static text as tooltip for various reasons, but the principle stays the same.)

here's the code in PreTranslateMessage:

BOOL CWFSEC2MailerTestDlg::PreTranslateMessage(MSG *pMsg){<br />
	CWnd *window=CWnd::FromHandle(pMsg->hwnd);<br />
<br />
	TRACKMOUSEEVENT trackmouseevent;<br />
	trackmouseevent.cbSize = sizeof(trackmouseevent);<br />
	trackmouseevent.dwFlags = TME_HOVER;<br />
	trackmouseevent.dwHoverTime= 0;//HOVER_DEFAULT;			//0 < HOVER_DEFAULT<br />
	if(window != NULL){<br />
		trackmouseevent.hwndTrack = window->m_hWnd;<br />
		TrackMouseEvent(&trackmouseevent);<br />
	}<br />
<br />
	switch	(pMsg->message){<br />
		case WM_MOUSEHOVER:		if(!hover_on){<br />
									SetToolTipText(window->m_hWnd);<br />
									hover_on = true;<br />
								}						//end if<br />
		break;		<br />
		case WM_MOUSELEAVE:		hover_on = false;<br />
		break;<br />
		case WM_LBUTTONUP:		Invalidate();<br />
		break;<br />
		default:	//do nothing here<br />
		break;<br />
	}													//end switch<br />
	return CDialog::PreTranslateMessage(pMsg);<br />
}														//end function PreTranslateMessage<br />



tnx to all who tried to help...!

"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
QuestionAny Suggestin about shrink/ stretch a BMP? Pin
ytod13-Dec-04 22:25
ytod13-Dec-04 22:25 
AnswerRe: Any Suggestin about shrink/ stretch a BMP? Pin
namaskaaram13-Dec-04 22:43
namaskaaram13-Dec-04 22:43 
GeneralRe: Any Suggestin about shrink/ stretch a BMP? Pin
ytod13-Dec-04 23:13
ytod13-Dec-04 23:13 
GeneralRe: Any Suggestin about shrink/ stretch a BMP? Pin
namaskaaram14-Dec-04 0:48
namaskaaram14-Dec-04 0:48 
GeneralWindows NT Authentication Pin
rasha200313-Dec-04 22:20
rasha200313-Dec-04 22:20 
GeneralRe: Windows NT Authentication Pin
Antony M Kancidrowski14-Dec-04 1:09
Antony M Kancidrowski14-Dec-04 1:09 
GeneralRe: Windows NT Authentication Pin
rasha200314-Dec-04 3:55
rasha200314-Dec-04 3:55 
GeneralRe: Windows NT Authentication Pin
Antony M Kancidrowski14-Dec-04 4:08
Antony M Kancidrowski14-Dec-04 4:08 
Generalweird behaviour with escape character Pin
doneirik13-Dec-04 22:18
doneirik13-Dec-04 22:18 
GeneralRe: weird behaviour with escape character Pin
AslFunky14-Dec-04 1:33
AslFunky14-Dec-04 1:33 
GeneralRe: weird behaviour with escape character Pin
doneirik14-Dec-04 1:54
doneirik14-Dec-04 1:54 
GeneralRe: weird behaviour with escape character Pin
David Crow14-Dec-04 2:13
David Crow14-Dec-04 2:13 
GeneralRe: weird behaviour with escape character Pin
doneirik14-Dec-04 3:47
doneirik14-Dec-04 3:47 
GeneralVB Callback function with string in VC DLL Pin
Michael Olsen13-Dec-04 21:59
Michael Olsen13-Dec-04 21:59 
GeneralDirectShow : Linker Error Pin
tspramod13-Dec-04 21:40
tspramod13-Dec-04 21:40 
GeneralRe: DirectShow : Linker Error Pin
Sujan Christo13-Dec-04 21:53
Sujan Christo13-Dec-04 21:53 
GeneralRe: DirectShow : Linker Error Pin
ytod13-Dec-04 22:18
ytod13-Dec-04 22:18 

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.