i am programing tooltip control.
but, i found that the tooltip window only can display 80 characters.
whether it can extend to 250 characters ?
the following struct be found in windows.inc.
but szText was limited at 80.
can anyone give me some suggestions ?
thank.
NMTTDISPINFO STRUCT
hdr NMHDR <>
lpszText DWORD ?
szText BYTE 80 dup (?)
union
hInst dd ?
hinst dd ?
ends
uFlags DWORD ?
lParam LPARAM ?
NMTTDISPINFO ENDS
TOOLTIPTEXT equ <NMTTDISPINFO>
If that's what it is, then I don't think you have the option to change it.
It is short because tooltips are only meant to be for short notification messges. And they only stay visible for a short time, so if the message is too long you won't have a change to read it all anyway.
Although.. (this is for the 'new' balloon style tooltips, so I'm not sure whether the same works for the 'old' type.)
QuoteNote that the text buffer specified by the szText member of the NMTTDISPINFO structure can accommodate only 80 characters. If you need to use a longer string, point the lpszText member of NMTTDISPINFO to a buffer containing the desired text.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tooltip/usingtooltips.asp
If you fill lpszText with a pointer to your >80 string, be aware of NMTTDISPINFO.hinst -
if lpszText is a pointer, NMTTDISPINFO.hinst must be NULL
else lpszText is the identifier of a string resource and NMTTDISPINFO.hinst is the program HINSTANCE.
Hello,
Tooltips are not limited to 80 caracteres if you use a common control.
A full page is possible.
ToutEnMasm
mov NewCommonStr.dwICC,ICC_COOL_CLASSES or ICC_USEREX_CLASSES or ICC_BAR_CLASSES or ICC_TAB_CLASSES or ICC_WIN95_CLASSES or ICC_LISTVIEW_CLASSES
invoke CreateWindowEx,WS_EX_TOPMOST,addr szToolTipClass,NULL,WS_POPUP or TTS_NOPREFIX or TTS_BALLOON,0,0,0,0,hWin,NULL,hInstance,NULL
mov hToolTip,eax
ToutEnMasm,
I did not know that, that is very useful! Can you put together a small example demonstrating this method? This would be VERY helpful to me and others.
Thanks,
Paul
thank Tedd, sinsi, ToutEnMasm, and PBrennick with resply
thank Tedd, sinsi, ToutEnMasm, and PBrennick with replies.
i use lpszText to replace szText. now, it can work well. :bg
ToutEnMasm, common control ?
can you post a example for me, i think to study this. thank :U
Hello,
This sample show how to create it and move it.
When you clic the buttons ,the tooltip made a square rotate around the window.
You can change the size of the window, the moves of the tooltip follow the changes.
ToutEnMasm
[attachment deleted by admin]
Hello,ToutEnMasm
could you change the tooltip window into transparent style?
This can surely be made.There is an article in msdn on "layered windows" if my memory is good.
Find it , and put the modifie sample here !.
ToutEnMasm
Hey,ToutEnMasm
i'm trying,but i can't.
see the post( http://www.masm32.com/board/index.php?topic=4861.0 )
six_L, have a look at this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/usingwindows.asp
Hello,sinsi
i saw the doc.
i can change the main window into transparent style. but the tooltip window always is failed.