Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Everybody says call:

CToolTipCtrl::SetMaxTipWidth(0); <- Not everyone agree with the argument btw.

Then use \n or \n\r in the Tip string.

But nevertheless regardless of where I make this call I am greeted with

error C2352: 'CToolTipCtrl::SetMaxTipWidth' : illegal call of non-static member function


Why?

I calling this from a COM DLL that has a configuration dialog that I have implemented the tooltips on.
Posted

1 solution

because SetMaxTipWidth is not a static method

You'll have to call that method on the CToolTipCtrl object you have created/attached to; if you haven't got one because you're using WTL, just send the TTM_SETMAXTIPWIDTH[^] message to the control, using CWindow(<your control's HWND here>).SendMessage(TTM_SETMAXTIPWIDTH,0,-1) or similar
 
Share this answer
 
v2
Comments
Ron Anders 14-Jul-12 22:19pm    
Thank You barneyman,

I haven't got one. I'll try Send Message.

:Ron
Ron Anders 14-Jul-12 22:40pm    
That worked barneyman.

You are da BarneyMan!

Thank you EVER so much!

:Ron
[no name] 15-Jul-12 7:59am    
A straightforward question with a straightforward answer - great.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900