Chris E. Miller ToolTip (D1)

jicman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 25 11:44:11 PDT 2014


On Thursday, 14 November 2013 at 16:17:53 UTC, Heinz wrote:
> You have to manually set the tooltip's max width to a fixed 
> value using the tooltip handle and Win32 API, by doing this 
> you're telling the tooltip object it is a multiline tooltip and 
> from now on it will accept \r\n as end of line:
>
>     ttip = new ToolTip;
>     SendMessageA(ttip.handle, TTM_SETMAXTIPWIDTH, 0, 250);
>     ttip.setToolTip(find, "a=n (not approved)\r\no=n (not 
> outlooked)\r\nt>0 (total > 0));
>
> That's it, it works (i tested it).
>
> By the way, the DFL version on Chris' site is for D1 but 
> there's this version for D2 (i use both): 
> https://github.com/Rayerd/dfl/tree/master/win32/dfl

Sorry for my tardiness in respond, Heinz. And thanks for the 
help.  By the way, for those out there that are not Windows 
friendly like me, :-), I used the following to make it work.

   SendMessageA(ttip.handle, 0x0400 + 24, 0, 250);

Since I got

Error: undefined identifier TTM_SETMAXTIPWIDTH

when building the code.  Thanks again, Heinz.

josé


More information about the Digitalmars-d-learn mailing list