views:

100

answers:

1

My App is MFC based and uses the CToolTipCtrl to implement Tool Tips. The Tool Tips are in a string table resource and each tool tip is loaded with LoadStringW. Try as I might I cannot get the Tool Tips to display over multiple lines. Each tool tips is displayed as a single line.

I tried adding \r\n &\n /\r/\n to the middle of a tool tip string but nothing works.

Example:

In the string table

IPD_TT_ACC_ID Please enter the account id.\r\n The account ID can be obtained from the Helpdesk

Should be displayed as:

Please enter the account id.
The account ID can be obtained from the Helpdesk

But is displayed as:

Please enter the account id. The account ID can be obtained from the Helpdesk

+3  A: 

I solved that problem in the past by using SetMaxTipWidth method.

Example:

 m_ToolTipCtrl->SetMaxTipWidth( 300 ); // for multiline messages
Nick D
I can confirm this. Without SetMaxTipWidth only the first sentence was displayed. With SetMaxTipWidth it worked as intended.
djeidot
Perfect Thanks...
Canacourse