I've played with treeview, i can change embedded tooltip style to balloon style and i can overwrite standard txt with my custom balloon text. it works fine.

The thing i cannot implement is wait time before popup.
TTDT_INITIAL did not work.
and how can i change popup position?
I think TTM_GETTOOLINFO,change TOOLINFO.rect,TTM_SETTOOLINFO, but when ?
Because this is embedded tooltip into treeiew, i cannot catch when popup. Ok, on initialisation i can change style, and when TVN_GETINFOTIP occur i can change text.
thanks and regards....s5vi

;
; treeview balloon tooltip
;
invoke SendMessage,hTrv,TVM_GETTOOLTIPS,0,0
mov hTrvTT,eax
invoke SendMessage,hTrvTT,TTM_SETTITLE,1,StrAddr ( "A menüpont leírása:" )
invoke SendMessage,hTrvTT,TTM_SETDELAYTIME,TTDT_AUTOPOP,2000
invoke GetWindowLong,hTrvTT,GWL_STYLE
or eax,TTS_BALLOON
invoke SetWindowLong,hTrvTT,GWL_STYLE,eax
The thing i cannot implement is wait time before popup.
TTDT_INITIAL did not work.
and how can i change popup position?
I think TTM_GETTOOLINFO,change TOOLINFO.rect,TTM_SETTOOLINFO, but when ?
Because this is embedded tooltip into treeiew, i cannot catch when popup. Ok, on initialisation i can change style, and when TVN_GETINFOTIP occur i can change text.
thanks and regards....s5vi
To set the delay time use TTM_SETDELAYTIME with TTDT_INITIAL and TTDT_RESHOW. You are using TTDT_AUTOPOP, which sets the amount of time before the window is hidden. To move the popup try:
invoke MoveWindow, hTrvTT, x, y, height, width, TRUE
invoke MoveWindow, hTrvTT, x, y, height, width, TRUE
Synire, thanks for your tips,
Yes, i used TTDT_AUTOPOP to set balloon duration to 2 sec, as i wrote, i tried TTDT_INITIAL to set time before balloon popup,but did not work.The tooltip shown immediately. I think this is internal feature in treeview control.
But TTDT_AUTOPOPUP value can be overwritten. Strange.
You suggest MoveWindow, i will try. Do you mean i put this into TVN_GETINFOTIP event handler ? But at this point tooltip not shown yet, isnt it ? How can i figure out when that tooltip will be shown? I think that MoveWindow msg will work properly after tooltip shown......
Yes, i used TTDT_AUTOPOP to set balloon duration to 2 sec, as i wrote, i tried TTDT_INITIAL to set time before balloon popup,but did not work.The tooltip shown immediately. I think this is internal feature in treeview control.
But TTDT_AUTOPOPUP value can be overwritten. Strange.
You suggest MoveWindow, i will try. Do you mean i put this into TVN_GETINFOTIP event handler ? But at this point tooltip not shown yet, isnt it ? How can i figure out when that tooltip will be shown? I think that MoveWindow msg will work properly after tooltip shown......
TTDT_INITIAL sets the time for the first time the popup is show, TTDT_RESHOW sets the time for all subsequent times shown.
The MoveWindow suggestion was for you to subclass the tooltip control and move the window where you want during a WM_PAINT message. It shouldn't be that hard, something like:
Also, once you subclass, you could manage the delay by adding your own handler for the WM_TIMER message, which windows uses to show/hide the window. But how to go about working that is really up to you.
Regards,
Bryant Keller
The MoveWindow suggestion was for you to subclass the tooltip control and move the window where you want during a WM_PAINT message. It shouldn't be that hard, something like:
.data
g_TipHandler dd 0
...
.code
...
invoke SetWindowLong, hTrvTT, GWL_WNDPROC, OFFSET MyTipHandler
mov g_TipHandler, eax
...
MyTipHandler PROC hTip:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD
LOCAL dwX, dwX, dwHeight, dwWidth
.if ( uMsg == WM_PAINT )
... ; Calculate where you want the control moved too
invoke MoveWindow, hTip, dwX, dwY, dwHeight, dwWidth, FALSE
.endif
invoke CallWindowProc, g_TipHandler, hTip, uMsg, wParam, lParam
ret
MyTipHandler ENDP
Also, once you subclass, you could manage the delay by adding your own handler for the WM_TIMER message, which windows uses to show/hide the window. But how to go about working that is really up to you.
Regards,
Bryant Keller
Oh,i see....subclass that tooltip...good idea! :D
:shock: And now, some completely different: i saw your given homepage (nasm) and read: "This also means that Nasm32 can build applications on Linux/BSD systems which support gcc and libc."
Very interesting for me (i'm a linux fan). Is there any tutorial to write apps with nasm and libc?
Thanks.....
:shock: And now, some completely different: i saw your given homepage (nasm) and read: "This also means that Nasm32 can build applications on Linux/BSD systems which support gcc and libc."
Very interesting for me (i'm a linux fan). Is there any tutorial to write apps with nasm and libc?
Thanks.....
Not at the moment, I'm kinda stuck between a few other projects but I do plan to eventually write full documentation for the Nasm32 project. If you look at /nasm32/examples/demo11 it shows a very simple application using the LibC.mac extention. It also explains how to build it on both Windows and Linux/BSD systems. If you wish to use the LibC.mac extention for portable coding, you will need a LibC compatible compiler along with the Nasm32 project files. I suggest using MinGW or DevC++ because I know for a fact those are compliant.. I had some problems using DJGPP, but apparently it's because of the unsupported object format that DJGPP uses.
Regards,
Bryant Keller
Regards,
Bryant Keller