i'm trying to make a detachable toolbox and things work if i add the toolwindow manually instaead of drag/dropping it into the ReBar. Can someone see what is wrong? Thanks and laterz :)
This might help: Drag and Drop (OLE), MSDN (http://msdn.microsoft.com/en-us/library/96826a87(v=vs.80).aspx),...
And,...Creating an Internet Explorer-style Toolbar, MSDN (http://msdn.microsoft.com/en-us/library/bb775452(v=vs.85).aspx),...
And, of course,...Rebar: Information About Programming Elements Used With Rebar Controls, MSDN (http://msdn.microsoft.com/en-us/library/bb774375(v=VS.85).aspx)
Well baltoro. That wasnt very helpful. This OLE thing is something ive never done. I dropped the adding of the toolwindow to the toolbar and added just the toolbar inside the toolwindow then heed the toolwindow and it works. Thanks a lot guys. The example is kinda sketchy. I'll clean things up later. Here it goes.
Thanks a lot guys and laters
XANDAZ,
Quote from: XANDAZ...This OLE thing is something ive never done,...
...Well,...yeah,...OLE, in assembly language has got to be excruciatingly painful,...
Hello Sr xandaz, in your toolbar you have forgot to put TBSTYLE_TOOLTIPS, after you can send a messaget TB_GETTOLTIPS, and store the handle of tooltip, after set the tooltips to a rebar handle. After this you can deal with notify. These code are based in your 2nd example.
.data
htool dd ?
sametoall dd "empty slot",00h
.code
;ToolboxWndProc PROC ...
...
invoke CreateWindowEx,NULL,addr ToolbarClass,NULL,WS_VISIBLE+WS_CHILD+TBSTYLE_ALTDRAG+TBSTYLE_TOOLTIPS,\
0,0,CW_USEDEFAULT,CW_USEDEFAULT,hWnd,NULL,hInstance,NULL
mov hToolbar,eax
INVOKE SendMessage,hToolbar,TB_GETTOOLTIPS,0,0
mov htool,eax
invoke SendMessage,hReBar,RB_SETTOOLTIPS,htool,0
...
.ELSEIF uMsg == WM_NOTIFY
mov ebx,lParam
mov eax,[ebx].NMHDR.code
.IF eax == TTN_NEEDTEXT
mov ecx,[ebx].NMHDR.idFrom
;in ecx have the ID of button that send this notify message, deal with it
mov eax,offset sametoall
mov [ebx].TOOLTIPTEXT.lpszText,eax
mov eax,FALSE
ret
.endif
Thanks for the tip mineiro. Obrigadinho pela dica meu irmão. Tá visto que você domina a coisa.
Bye and laters