I'm having trouble getting info from a tool tip in MFC. I initialize a tooltip:
m_pToolTip->Create(this, TTS_NOPREFIX);
m_pToolTip->SetMaxTipWidth(SHRT_MAX);
m_pToolTip->SetTipTextColor(0x000000ff);//0x00bbggrr
m_pToolTip->SetDelayTime(TTDT_AUTOPOP, 1000*60*60*24); //leave tooltip popped up for 1 day
m_pToolTip->SetDelayTime(TTDT_INITIAL, 0); //instant tool tips
m_pToolTip->AddTool(this, "", NULL, 0);
m_pToolTip->Activate(FALSE);
And later I want to get the bounding rectangle of the tooltip. However, I can't find any examples on how to get the information. Here's what I've tried:
CToolInfo toolInfo;
m_pToolTip->GetToolInfo(toolInfo, this, 0);
CRect rect = toolInfo.rect;
For some reason this doesn't seem to work. I try to setup a quick watch on "rect" when I debug, and it is telling me "Error: symbol "rect" not found". Could someone please show me how to fix my code so that I can retrieve the information on the tooltip?
Thanks in advance!
m_pToolTip->Create(this, TTS_NOPREFIX);
m_pToolTip->SetMaxTipWidth(SHRT_MAX);
m_pToolTip->SetTipTextColor(0x000000ff);//0x00bbggrr
m_pToolTip->SetDelayTime(TTDT_AUTOPOP, 1000*60*60*24); //leave tooltip popped up for 1 day
m_pToolTip->SetDelayTime(TTDT_INITIAL, 0); //instant tool tips
m_pToolTip->AddTool(this, "", NULL, 0);
m_pToolTip->Activate(FALSE);
And later I want to get the bounding rectangle of the tooltip. However, I can't find any examples on how to get the information. Here's what I've tried:
CToolInfo toolInfo;
m_pToolTip->GetToolInfo(toolInfo, this, 0);
CRect rect = toolInfo.rect;
For some reason this doesn't seem to work. I try to setup a quick watch on "rect" when I debug, and it is telling me "Error: symbol "rect" not found". Could someone please show me how to fix my code so that I can retrieve the information on the tooltip?
Thanks in advance!