Click here to Skip to main content
15,847,653 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SendMessage in VS 2008 Pin
CString(0xcccccccc)15-Apr-09 13:48
CString(0xcccccccc)15-Apr-09 13:48 
GeneralRe: SendMessage in VS 2008 Pin
Stuart Dootson15-Apr-09 16:33
professionalStuart Dootson15-Apr-09 16:33 
GeneralRe: SendMessage in VS 2008 Pin
CString(0xcccccccc)15-Apr-09 22:31
CString(0xcccccccc)15-Apr-09 22:31 
GeneralRe: SendMessage in VS 2008 Pin
Stuart Dootson15-Apr-09 23:30
professionalStuart Dootson15-Apr-09 23:30 
GeneralRe: SendMessage in VS 2008 Pin
CString(0xcccccccc)16-Apr-09 12:38
CString(0xcccccccc)16-Apr-09 12:38 
GeneralRe: SendMessage in VS 2008 Pin
Stuart Dootson16-Apr-09 14:46
professionalStuart Dootson16-Apr-09 14:46 
GeneralRe: SendMessage in VS 2008 Pin
CString(0xcccccccc)16-Apr-09 23:16
CString(0xcccccccc)16-Apr-09 23:16 
Questioncreating tooltip that follows cusor, to display coordinates. Pin
soongez15-Apr-09 7:21
soongez15-Apr-09 7:21 
Hi, I have a custom control that I've made and I want a tooltip hover near the the mouse as move over it, and stay near the mouse, i.e. illustrating positions of the current position within the custom control.

I used the code from MSDN, but I must not be getting it quite right as its not doing anything right now, so I can't start writing code so that it follows my cursor.
So far I've added a OnMouseHover event, so when the cursor enters the area of the custom control I think I should create a tooltip. Here is what I have so far.

// toolID:  the resource ID of the control.
// hDlg:    the handle of the dialog box.
// pText:   the text that appears in the ToolTip.
// g_hInst: the global instance handle.

//HWND hwndTool = GetDlgItem(NULL, IDC_LINECHART1);

// CREATE A TOOLTIP WINDOW
HWND hwndTip = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
    WS_POPUP |TTS_ALWAYSTIP | TTS_BALLOON,
    CW_USEDEFAULT, CW_USEDEFAULT,
    CW_USEDEFAULT, CW_USEDEFAULT,
    NULL, NULL,
    NULL, NULL);

// Associate the ToolTip with the tool.
TOOLINFO toolInfo = { 0 };
toolInfo.cbSize = sizeof(toolInfo);
toolInfo.hwnd = m_hWnd;
toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
toolInfo.uId = IDC_LINECHART1;//(UINT_PTR)hwndTool;
toolInfo.lpszText = _T("FAIL");
::SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);


I'm not really sure what hDlg and g_hInst is supposed to be, and how to get it,

thanks
soong
AnswerRe: creating tooltip that follows cusor, to display coordinates. Pin
Stuart Dootson15-Apr-09 10:40
professionalStuart Dootson15-Apr-09 10:40 
QuestionRe: creating tooltip that follows cusor, to display coordinates. Pin
Maximilien15-Apr-09 11:06
Maximilien15-Apr-09 11:06 
AnswerRe: creating tooltip that follows cusor, to display coordinates. Pin
soongez15-Apr-09 16:19
soongez15-Apr-09 16:19 
AnswerRe: creating tooltip that follows cusor, to display coordinates. Pin
Rolf Kristensen15-Apr-09 21:49
Rolf Kristensen15-Apr-09 21:49 
QuestionDate Picker Control - Need to switch from British to American Format. Pin
Don Jones BNYMellon15-Apr-09 5:09
Don Jones BNYMellon15-Apr-09 5:09 
AnswerRe: Date Picker Control - Need to switch from British to American Format. Pin
led mike15-Apr-09 5:18
led mike15-Apr-09 5:18 
GeneralRe: Date Picker Control - Need to switch from British to American Format. Pin
Don Jones BNYMellon15-Apr-09 5:59
Don Jones BNYMellon15-Apr-09 5:59 
QuestionRe: Date Picker Control - Need to switch from British to American Format. Pin
David Crow15-Apr-09 6:57
David Crow15-Apr-09 6:57 
AnswerRe: Date Picker Control - Need to switch from British to American Format. Pin
Don Jones BNYMellon15-Apr-09 8:36
Don Jones BNYMellon15-Apr-09 8:36 
QuestionRe: Date Picker Control - Need to switch from British to American Format. Pin
David Crow15-Apr-09 8:39
David Crow15-Apr-09 8:39 
AnswerRe: Date Picker Control - Need to switch from British to American Format. Pin
Don Jones BNYMellon15-Apr-09 9:00
Don Jones BNYMellon15-Apr-09 9:00 
GeneralRe: Date Picker Control - Need to switch from British to American Format. Pin
Don Jones BNYMellon15-Apr-09 9:17
Don Jones BNYMellon15-Apr-09 9:17 
GeneralRe: Date Picker Control - Need to switch from British to American Format. Pin
David Crow15-Apr-09 10:15
David Crow15-Apr-09 10:15 
Questionhow to get the linux kernel version in cpp program Pin
scamguru15-Apr-09 4:09
scamguru15-Apr-09 4:09 
AnswerRe: how to get the linux kernel version in cpp program Pin
ParagPatel15-Apr-09 4:31
ParagPatel15-Apr-09 4:31 
GeneralRe: how to get the linux kernel version in cpp program Pin
scamguru15-Apr-09 5:12
scamguru15-Apr-09 5:12 
GeneralRe: how to get the linux kernel version in cpp program Pin
ParagPatel15-Apr-09 5:28
ParagPatel15-Apr-09 5:28 

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.