Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problems with Dialog Buttons Pin
David Crow31-Jul-06 8:31
David Crow31-Jul-06 8:31 
AnswerRe: Problems with Dialog Buttons Pin
valikac31-Jul-06 6:57
valikac31-Jul-06 6:57 
AnswerRe: Problems with Dialog Buttons Pin
kitty531-Jul-06 7:00
kitty531-Jul-06 7:00 
GeneralRe: Problems with Dialog Buttons Pin
Hamid_RT31-Jul-06 18:55
Hamid_RT31-Jul-06 18:55 
AnswerRe: Problems with Dialog Buttons Pin
RChin31-Jul-06 8:31
RChin31-Jul-06 8:31 
GeneralRe: Problems with Dialog Buttons Pin
Zac Howland31-Jul-06 8:47
Zac Howland31-Jul-06 8:47 
QuestionLVM_ENABLEGROUPVIEW breaks LVM_SOTITEMSEX Pin
peterchen31-Jul-06 6:31
peterchen31-Jul-06 6:31 
QuestionTooltip Pin
Manjunath S31-Jul-06 5:51
Manjunath S31-Jul-06 5:51 
hi all

I am creating tool tip for a button by using following code.

void CreateMyTooltip(HWND hwnd)
{
HWND hwndTT;
TOOLINFO ti;
LPTSTR lptstr = (LPTSTR)"This is my button";
RECT rect;
hwndTT = CreateWindowEx(NULL,
TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON |
TTS_ALWAYSTIP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);

SetWindowPos(hwndTT,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE |
SWP_NOACTIVATE);

GetClientRect (hwnd, &rect);
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_SUBCLASS | TTF_TRANSPARENT;
ti.hwnd = hwnd;
ti.hinst = NULL;
ti.uId = IDC_BUTTON1; // To this button i am adding tooltip
ti.lpszText = lptstr;
ti.rect.left = rect.left;
ti.rect.top = rect.top;
ti.rect.right = rect.right;
ti.rect.bottom = rect.bottom;

SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti);
}

when i moved my mouse on the button, instead of tool tip message "This is my button" i am getting |||||||||||, rectangular boxes.

I am new to win32 api'
thanks for ur valuable suggestions

Manjunath S
GESL
Bangalore
AnswerRe: Tooltip Pin
Hans Dietrich31-Jul-06 9:53
mentorHans Dietrich31-Jul-06 9:53 
QuestionFlexgrid cell 0,0 (row=0,col=0) selection problem Pin
pc_dev31-Jul-06 5:37
pc_dev31-Jul-06 5:37 
QuestionRuntime error 48 calling C++ DLL from Access Pin
GaryDean31-Jul-06 5:23
GaryDean31-Jul-06 5:23 
AnswerRe: Runtime error 48 calling C++ DLL from Access Pin
Hamid_RT31-Jul-06 5:44
Hamid_RT31-Jul-06 5:44 
AnswerRe: Runtime error 48 calling C++ DLL from Access Pin
Neil Van Eps31-Jul-06 5:55
Neil Van Eps31-Jul-06 5:55 
AnswerRe: Runtime error 48 calling C++ DLL from Access Pin
Hamid_RT31-Jul-06 6:45
Hamid_RT31-Jul-06 6:45 
QuestionReading from a file Pin
sdt2431-Jul-06 4:57
sdt2431-Jul-06 4:57 
AnswerRe: Reading from a file Pin
toxcct31-Jul-06 5:05
toxcct31-Jul-06 5:05 
AnswerRe: Reading from a file Pin
Zac Howland31-Jul-06 5:06
Zac Howland31-Jul-06 5:06 
AnswerRe: Reading from a file Pin
ThatsAlok31-Jul-06 18:32
ThatsAlok31-Jul-06 18:32 
QuestionProblem with conversion from VC6... Pin
ctroyp31-Jul-06 4:17
ctroyp31-Jul-06 4:17 
AnswerRe: Problem with conversion from VC6... Pin
Sarath C31-Jul-06 4:22
Sarath C31-Jul-06 4:22 
AnswerRe: Problem with conversion from VC6... Pin
ThatsAlok31-Jul-06 4:25
ThatsAlok31-Jul-06 4:25 
GeneralRe: Problem with conversion from VC6... Pin
ctroyp31-Jul-06 10:22
ctroyp31-Jul-06 10:22 
GeneralRe: Problem with conversion from VC6... Pin
ThatsAlok31-Jul-06 18:21
ThatsAlok31-Jul-06 18:21 
QuestionMinimum Window Size Pin
BubbaGee31-Jul-06 3:36
BubbaGee31-Jul-06 3:36 
AnswerRe: Minimum Window Size Pin
ThatsAlok31-Jul-06 4:09
ThatsAlok31-Jul-06 4:09 

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.