Hello KetilO
I coding a new Addin for Radasm 3 and add a button to the toolbar
mov esi,[esi].ADDINHANDLES.hTbrMake
mov tbb.iBitmap,eax
mov tbb.fsState,TBSTATE_ENABLED
mov tbb.fsStyle,TBSTYLE_BUTTON
mov tbb.dwData,0
mov tbb.iString,NULL
invoke SendMessage,esi,TB_ADDBUTTONS,1,ADDR tbb
all works fine but how i can add a tooltip to the button?
i use a dirty way with subclass
invoke SetWindowLong,[eax].ADDINHANDLES.hWnd,GWL_WNDPROC,offset OnRadasm_WMNotify
OnRadasm_WMNotify proc hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
mov eax, uMsg
.if eax == WM_NOTIFY
mov ebx,lParam
mov eax,[ebx].NMHDR.code
.if eax == TTN_NEEDTEXT ;so we must show some tooltip text
mov ecx,[ebx].NMHDR.idFrom ;what button is sending this message to us?
.if ecx == IDAddIn
mov ebx,lParam
mov eax,offset AppName ;a offset to our new tooltip string
mov [ebx].TOOLTIPTEXT.lpszText,eax
mov eax,TRUE
ret
.endif
.endif
.endif
invoke CallWindowProc,OldWndProc,hWin, uMsg, wParam, lParam
ret
OnRadasm_WMNotify endp
Can you add a function like Radasm 2 AIM_TBRTOOLTIP?
Or gives a better solution?
greets,