Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbars - Changing Tool Tip Text Dynamically 1

Status
Not open for further replies.

shetlandbob

Programmer
Mar 9, 2004
528
GB
Can you change the tool tip text of a toolbar button in your code?

i.e. if flag = true tooptip = abcd
else if flag = false tooltip = qwerty
 
handle WN_NOTIFY from your toolbar with
lpToolText->hdr.code that equals to TTN_NEEDTEXT.
lpToolText you will egt like this:
lpToolText = (LPTOOLTIPTEXT)lParam;

now change the text:
lpToolText->lpszText = L"some message"

Also before set text you should check if the message you get is from your toolbar
if(lpToolText->hdr.idFrom == ID_YOUR_TOOLBAR)...

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top