Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Inheritance in C Pin
Roger Stoltz30-May-06 3:07
Roger Stoltz30-May-06 3:07 
AnswerRe: Inheritance in C Pin
Michael Dunn30-May-06 6:51
sitebuilderMichael Dunn30-May-06 6:51 
GeneralRe: Inheritance in C Pin
toxcct30-May-06 7:19
toxcct30-May-06 7:19 
GeneralRe: Inheritance in C Pin
NiceNaidu30-May-06 18:30
NiceNaidu30-May-06 18:30 
GeneralRe: Inheritance in C Pin
NiceNaidu30-May-06 18:32
NiceNaidu30-May-06 18:32 
GeneralRe: Inheritance in C Pin
toxcct30-May-06 21:37
toxcct30-May-06 21:37 
Questionwindows mobile 5.0 for pocket pc (How to start coding?) Pin
Ravi_wm530-May-06 1:41
Ravi_wm530-May-06 1:41 
AnswerWrapping text in CToolTipCtrl Pin
Sarath C30-May-06 1:35
Sarath C30-May-06 1:35 
There was a question from a reader in this forum, regarding wrapping the text in teh tooltip control. All you need to do is to set the tip width using SetMaxTipWidth function. CToolTipCtrl will wrap remaining text to next line bu automatically adjusting its height.

see the sample snippet

m_ToolTip.Create(this,0x40);
TOOLINFO ti;
ti.cbSize = sizeof(TOOLINFO);
ti.lpszText = "1. This is Item1\r\n2. This is Item1\r\n3. This is Item1";
ti.hinst = AfxGetInstanceHandle();
ti.hwnd = pWnd->GetSafeHwnd();
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND | TTF_TRANSPARENT ;
ti.uId = (UINT) pWnd->m_hWnd;
m_ToolTip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
m_ToolTip.SetDelayTime(2000,200);
m_ToolTip.SetTipBkColor(RGB(0xFF,0,0));
m_ToolTip.SetTipTextColor(RGB(0xFF,0xFF,0xFF));

// just for more accuracy Smile | :)
CDC* pDC = GetDC();
m_ToolTip.SetMaxTipWidth(pDC->GetTextExtent("1. This is Item1").cx);


SaRath

"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!" /

-- modified at 7:36 Tuesday 30th May, 2006
GeneralRe: Wrapping text in CToolTipCtrl Pin
NiceNaidu30-May-06 1:45
NiceNaidu30-May-06 1:45 
Questionapi function hook/createfile,deletefile hook Pin
cnez30-May-06 1:05
cnez30-May-06 1:05 
QuestionActivex hWnd on CFormView Pin
dcwally30-May-06 0:47
dcwally30-May-06 0:47 
Questionconnecting to DB using ADO Pin
antonaras30-May-06 0:00
antonaras30-May-06 0:00 
AnswerRe: connecting to DB using ADO Pin
NiceNaidu30-May-06 0:31
NiceNaidu30-May-06 0:31 
GeneralRe: connecting to DB using ADO Pin
antonaras30-May-06 1:24
antonaras30-May-06 1:24 
AnswerRe: connecting to DB using ADO Pin
Hamid_RT30-May-06 4:00
Hamid_RT30-May-06 4:00 
GeneralRe: connecting to DB using ADO Pin
antonaras30-May-06 4:11
antonaras30-May-06 4:11 
GeneralRe: connecting to DB using ADO Pin
Hamid_RT30-May-06 4:20
Hamid_RT30-May-06 4:20 
GeneralRe: connecting to DB using ADO Pin
antonaras30-May-06 4:43
antonaras30-May-06 4:43 
QuestionAdd custom defined ID to the ComboBox Pin
willbin29-May-06 23:51
willbin29-May-06 23:51 
AnswerRe: Add custom defined ID to the ComboBox Pin
Nibu babu thomas30-May-06 0:01
Nibu babu thomas30-May-06 0:01 
GeneralRe: Add custom defined ID to the ComboBox Pin
willbin30-May-06 1:44
willbin30-May-06 1:44 
QuestionClass view Pin
Anu_Bala29-May-06 23:44
Anu_Bala29-May-06 23:44 
AnswerRe: Class view Pin
NiceNaidu30-May-06 0:29
NiceNaidu30-May-06 0:29 
GeneralRe: Class view Pin
Anu_Bala30-May-06 0:45
Anu_Bala30-May-06 0:45 
GeneralRe: Class view Pin
NiceNaidu30-May-06 1:00
NiceNaidu30-May-06 1:00 

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.