jmasterx
jmasterx

Reputation: 54113

Manually bring up tooltip? (WinAPI)

I've been reading about how tooltips work and it seems like I need to register each tool to the window. My issue is, I have a custom color wheel and I want it to show the tooltip for the RGB, HSV etc of that color which means I won't be registering multiple tools. From the looks of it, the tooltip works with a string resource and needs each tool to be registered, but I would like to manually call the tooltip and have it show mu custom string containing information regarding the color the mouse is under. Thanks

Upvotes: 2

Views: 712

Answers (1)

Hans Passant
Hans Passant

Reputation: 941455

No, a string resource is not needed, you can also set TOOLINFO.lpszText to a pointer to a regular string. Consider your usage, you probably want to use TTM_TRACKACTIVATE and TTM_TRACKPOSITION.

Beware that this isn't really appropriate use of tool tips. You'll fight the timeout. Once it trips, you can't get the tip back.

Upvotes: 1

Related Questions