开发者

Manually bring up tooltip? (WinAPI)

I've been reading about how tooltips work and it seems like I need to register each t开发者_如何学Goool 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜