Click here to Skip to main content
16,005,206 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GDI Objects Pin
BlitzPackage4-Jan-07 13:51
BlitzPackage4-Jan-07 13:51 
Questionscreen drawing application Pin
_tasleem4-Jan-07 2:37
_tasleem4-Jan-07 2:37 
AnswerRe: screen drawing application Pin
Chris Losinger4-Jan-07 2:57
professionalChris Losinger4-Jan-07 2:57 
GeneralRe: screen drawing application Pin
Stephen Hewitt4-Jan-07 12:09
Stephen Hewitt4-Jan-07 12:09 
AnswerRe: screen drawing application Pin
2249174-Jan-07 3:04
2249174-Jan-07 3:04 
AnswerRe: screen drawing application Pin
Mark Salsbery4-Jan-07 5:30
Mark Salsbery4-Jan-07 5:30 
AnswerRe: screen drawing application Pin
Stephen Hewitt4-Jan-07 12:11
Stephen Hewitt4-Jan-07 12:11 
QuestionDisplaying a ToolTip Pin
ajitatif angajetor4-Jan-07 1:12
ajitatif angajetor4-Jan-07 1:12 
Hi everyone,

I'm trying to add a tooltip to my buttons on a toolbar,but without any luck.I checked it out with spy++ and HWND seems valid,but i can't activate the tool tip.According to documentation stuff,I do not have to write a message handler for my tooltips to be displayed (I use the TTF_SUBCLASS flag),am I wrong,or missing something in the code below?
<br />
RECT rect;<br />
HWND hwndTT;<br />
INITCOMMONCONTROLSEX iccex;<br />
ATLVERIFY((SendMessage(hwndParent,TB_GETITEMRECT,(WPARAM) iButton,(LPARAM) (LPRECT)&rect)) == TRUE); // get button rectangle,working OK.<br />
<br />
iccex.dwICC = ICC_WIN95_CLASSES;<br />
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);<br />
InitCommonControlsEx(&iccex);<br />
if ((hwndTT = CreateWindowEx(<br />
	WS_EX_TOPMOST,<br />
	TOOLTIPS_CLASS,<br />
	NULL,<br />
	WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,<br />
	CW_USEDEFAULT,<br />
	CW_USEDEFAULT,<br />
	CW_USEDEFAULT,<br />
	CW_USEDEFAULT,<br />
	hwndParent,<br />
	NULL,<br />
	NULL,<br />
	NULL<br />
	)) == NULL)<br />
	return NULL;<br />
<br />
::SetWindowPos(hwndTT,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);<br />
<br />
TOOLINFO ti;<br />
ti.cbSize = sizeof(TOOLINFO);<br />
ti.uFlags = TTF_SUBCLASS;<br />
ti.hwnd = hwndParent;<br />
ti.lpszText = (LPTSTR) lpszText;<br />
<br />
ti.rect.bottom = rect.bottom;<br />
ti.rect.left = rect.left;<br />
ti.rect.top = rect.top;<br />
ti.rect.right = rect.right;<br />
<br />
SendMessage(hwndTT,TTM_SETDELAYTIME,TTDT_INITIAL,0L);<br />
return SendMessage(hwndTT,TTM_ADDTOOL,0,(LPARAM)&ti);<br />

AnswerRe: Displaying a ToolTip Pin
toxcct4-Jan-07 1:20
toxcct4-Jan-07 1:20 
QuestionRe: Displaying a ToolTip Pin
prasad_som4-Jan-07 1:34
prasad_som4-Jan-07 1:34 
AnswerRe: Displaying a ToolTip Pin
ajitatif angajetor4-Jan-07 2:27
ajitatif angajetor4-Jan-07 2:27 
GeneralRe: Displaying a ToolTip Pin
prasad_som4-Jan-07 19:41
prasad_som4-Jan-07 19:41 
GeneralRe: Displaying a ToolTip Pin
ajitatif angajetor4-Jan-07 20:05
ajitatif angajetor4-Jan-07 20:05 
QuestionATL Service registration .... Pin
Sakthiu4-Jan-07 0:46
Sakthiu4-Jan-07 0:46 
AnswerRe: ATL Service registration .... Pin
James R. Twine4-Jan-07 3:36
James R. Twine4-Jan-07 3:36 
QuestionHow to restart MFC application from within itself Pin
Vinod Moorkkan4-Jan-07 0:25
Vinod Moorkkan4-Jan-07 0:25 
QuestionRe: How to restart MFC application from within itself Pin
prasad_som4-Jan-07 0:36
prasad_som4-Jan-07 0:36 
AnswerRe: How to restart MFC application from within itself Pin
jhwurmbach4-Jan-07 0:36
jhwurmbach4-Jan-07 0:36 
AnswerRe: How to restart MFC application from within itself Pin
Hamid_RT4-Jan-07 0:37
Hamid_RT4-Jan-07 0:37 
GeneralRe: How to restart MFC application from within itself Pin
toxcct4-Jan-07 1:21
toxcct4-Jan-07 1:21 
GeneralRe: How to restart MFC application from within itself Pin
Hamid_RT4-Jan-07 1:42
Hamid_RT4-Jan-07 1:42 
GeneralRe: How to restart MFC application from within itself Pin
toxcct4-Jan-07 6:31
toxcct4-Jan-07 6:31 
AnswerRe: How to restart MFC application from within itself Pin
2249174-Jan-07 0:43
2249174-Jan-07 0:43 
General[Off topic] Pin
toxcct4-Jan-07 1:22
toxcct4-Jan-07 1:22 
GeneralRe: [Off topic] Pin
2249174-Jan-07 1:35
2249174-Jan-07 1:35 

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.