| | |
Proc to set uo Tool Tips
Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
First it is in RosAsm style.
Sorry I am addicted to its simplicity of use.
The Proc is called from Dialog initiation
Sorry I am addicted to its simplicity of use.
The Proc is called from Dialog initiation
Assembly Syntax (Toggle Plain Text)
[Counter:D$ 0] ; Call for the first ToolTip Call SetTTip D$hdlg, ; H Dialog Handle of Dialog or Window 1, ; Tool tip number ID 1, ; Normal (not balloon 2 is balloon type) b_calculate,; Control ID number 1 ; Text Pointer to Ressource or pointer to a String ;To show success it returns with the HANDLE of the created Tool tip
[ToolTipsHandles: 0 #16] ; Space for 16 handles [TOOLINFOS: 0 #(48*16)] ; Space for 16 Structures [Mode1 &TTS_NOPREFIX + &TTS_ALWAYSTIP] ; declaration of values [Mode2 Mode1 + &TTS_BALLOON] [uFlags &TTF_SUBCLASS + &TTF_IDISHWND] Proc SetTTip: ;; Only individuals Each one has its complete system. The Proc maintains the data ;; Arguments @hWnd, ; Dialog or Window H @ttnb, ; Tool tip Number @Mode, ; Normal 1, Balloons 2 @CtlID, ; ID of Control @ttText Uses ebx [@ToolMode: ?] [@hToolHandle: ?] If D@ttnb > 16 Call 'USER32.MessageBoxA' D$hdlg, {'Only 16 Possible',0}, ; Text message {'ToolTip Id TOO High',0}, ; Box title 0 ; Box style jmp X1>> End_If ; Setup TOLINFO mov eax 48 ; Set for Base 0 dec D@ttnb mul D@ttnb add eax TOOLINFOS ;ToolInfo base mov ebx eax nop ;Setup TOOLINFO(Array) mov D$ebx 48 ; .cbSize mov D$ebx + 4 uFlags ; .uFlags mov eax D@hWnd mov D$ebx + 8 eax ; .hWnd Call 'USER32.GetDlgItem' eax , D@CtlID mov D$ebx + 12 eax mov eax D$hInstance mov D$ebx + 32 eax mov eax D@ttText mov D$ebx + 36 eax If D@Mode = 1 mov D@ToolMode Mode1 Else mov D@ToolMode Mode2 End_If Call 'USER32.CreateWindowExA' 0,TOOLTIPS_CLASS,0, D@ToolMode,0,0,0,0, D@hWnd,0, D$hinstance,0 ; Local Handle of Tool Tip mov D@hToolHandle eax Call 'USER32.SendMessageA' eax,;D@hToolHandle, ; Handle to tooltip 1 &TTM_ADDTOOL, 0, ebx;TOOLINFO ; Ptr to tool mov eax D@hToolHandle ; show valid handle,it is in the array anyway mov edx D@ttNb ;dec edx ; base to 0 was done at top sal edx 2 ; mult by 4 mov ebx HandlesArray add ebx edx mov D$ebx eax inc D$Counter ; Satellite for Controlling display X1: EndP
0
•
•
•
•
Sorry I saw a little thin missing
and I cannopt find < EDIT >
(being new here)
[HandlesArray: 0 #16]
the place holder for the handles.
An other thing:
I assumed that the Handle for the Instance is called hInstance
to allow other names an extra parameter shoud be passed to the proc
declaring it as @hInstance
and changing all $ to @ $=Global @ = Stack local for hInstance(not many)
Sorry for the inconveniance.
I am in the editing buisness !!!
; to toggle vision of tool tip
Proc TTToggle:
Arguments @ID,
@ONOFF ;0,1 ON OFF
uses ebx
mov ebx HandlesArray
mov eax D@ID
dec eax
shl eax 2
add ebx eax
mov eax D@ONOFF
;mov edx D$ebx
mov ebx D$ebx
Call 'USER32.SendMessageA' ebx,
&TTM_ACTIVATE,
eax, ; True/False
0
EndP
gbr.
and I cannopt find < EDIT >
(being new here)
[HandlesArray: 0 #16]
the place holder for the handles.
An other thing:
I assumed that the Handle for the Instance is called hInstance
to allow other names an extra parameter shoud be passed to the proc
declaring it as @hInstance
and changing all $ to @ $=Global @ = Stack local for hInstance(not many)
Sorry for the inconveniance.
I am in the editing buisness !!!
; to toggle vision of tool tip
Proc TTToggle:
Arguments @ID,
@ONOFF ;0,1 ON OFF
uses ebx
mov ebx HandlesArray
mov eax D@ID
dec eax
shl eax 2
add ebx eax
mov eax D@ONOFF
;mov edx D$ebx
mov ebx D$ebx
Call 'USER32.SendMessageA' ebx,
&TTM_ACTIVATE,
eax, ; True/False
0
EndP
gbr.
Similar Threads
- Beauty Tips Hub introduces the smartest way to set your style quotient (Website Reviews)
- Help: Tool Tips hide behind taskbar!!! (Windows NT / 2000 / XP)
- prblm while converting sql server stored proc to oracle stored proc (Oracle)
- just set up a designer clothes site, any tips on how to market it, pls (Promotion and Marketing Plans)
- tool tips (JavaScript / DHTML / AJAX)
| Thread Tools | Search this Thread |
Tag cloud for Assembly
3d 68hc11 6811 80386 :( adress array asm assembler assembly boot bootloader buffer compression cursor debug directory division docs dos draw emulator endtask error exceptions file int10h integer intel interrupt interrupts language loop newbie nohau osdevelopment print program range read remainder shape string text theory tsr x86



