Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Statusbar - SB_SETTIPTEXT
#1
i am struggling with this

lpszTooltip
Pointer to a character buffer that contains the new ToolTip text. ?

i do not understand what this means, i thought it was somethign liek this
SendMessage(id(16 hDlg) SB_SETTIPTEXT 0 "test")
SendMessage(id(16 hDlg) SB_SETTIPTEXT 1 "test1")
SendMessage(id(16 hDlg) SB_SETTIPTEXT 2 "test2")

also from my reading i had to set this when creating dialog
Function DEX_InitStatusBar
Code:
Copy      Help
SetWinStyle hsb SBT_TOOLTIPS 1

also if u could explain what the buffer is as i cant seem to make heads and tails.

or if i have it all wrong above, im wanting to set the tool tip text for each part of the statusbar
#2
1. The control must be CREATED with SBT_TOOLTIPS style. SetWinStyle will not work. Look in statusbar what is SBT_TOOLTIPS value and add it in dialog definition. It is 0x800.

16 msctls_statusbar32 0x54000100 0x0 0 128 222 14 ""

-->

16 msctls_statusbar32 0x54000900 0x0 0 128 222 14 ""

2. Tooltip is displayed only if statusbar part text is too long, or if there is only icon. This code will add long text to parts 0 and 1, and icon to part 2:
Code:
Copy      Help
str p0="part 0"
str p1="part 1"
str sp.all(1000 2 32)
p0+sp
p1+sp
SendMessage hsb SB_SETTEXTA 0 p0
SendMessage hsb SB_SETTEXTA 1 p1

__Hicon-- hi2=GetFileIcon("$qm$\run.ico")
SendMessage(hsb SB_SETICON 2 hi2)

3. Your SB_SETTIPTEXT text code is correct.
#3
1. what if statusbar text is changed. can tooltip still be displayed?
anyway to do this with out setting it to be too long if you have it called from a different function?

2. is thre a limit to how long or how short it can be. i.e. how long til it cant be displayed? how short is shortest for it to be displayed?
#4
Everything you can do is documented in MSDN library.

Simply append 1000 spaces to any string that you show in statusbar.
#5
yes, i have been looking plenty in msdn - I am only begining to understand, it does help me to a certain point, where everything is over my head. At times it does becoem clear after many readings, making sure what i am lookign at is the right thing and plenty of trial and error to go with it. Which i have done plenty of. Although i do use the Archive as a back drop. there is nothing better than tryign to solve on my own and reading all the exampels provided in this forum. There are times i feel ive done all that i can to solve.
i thank you for your time.and the help you provide
#6
i took so long in replying i didnt even notice the changes u had made or qm_experts post.

thanks for your help once again it is working.


Forum Jump:


Users browsing this thread: 1 Guest(s)