+ All Categories
Home > Documents > Td Win32asm 021.Asm

Td Win32asm 021.Asm

Date post: 02-Jun-2018
Category:
Upload: z4rm4r
View: 231 times
Download: 0 times
Share this document with a friend

of 21

Transcript
  • 8/10/2019 Td Win32asm 021.Asm

    1/21

  • 8/10/2019 Td Win32asm 021.Asm

    2/21

  • 8/10/2019 Td Win32asm 021.Asm

    3/21

    td_win32asm_021.asmfsState_00 db 4h ;state flags,4h=TBSTATE_ENABLEDfsStyle_00 db 0h ;button style,0h=TBSTYLE_BUTTONbReserved_00 dw 1h dup (0) ;reserved bytes,error in WIN32.HLP ?dwData_00 dd 0h ;application-defined valueiString_00 dd 0h ;zero-based index of button string

    iBitmap_01 dd 1h

    idCommand_01 dd 0C1hfsState_01 db 4hfsStyle_01 db 0hbReserved_01 dw 1h dup (0)dwData_01 dd 0hiString_01 dd 0h

    iBitmap_02 dd 2hidCommand_02 dd 0C2hfsState_02 db 4h

    fsStyle_02 db 0hbReserved_02 dw 1h dup (0)dwData_02 dd 0hiString_02 dd 0h

    iBitmap_03 dd 3hidCommand_03 dd 0C3hfsState_03 db 4hfsStyle_03 db 0hbReserved_03 dw 1h dup (0)dwData_03 dd 0h

    iString_03 dd 0h

    iBitmap_04 dd 4hidCommand_04 dd 0C4hfsState_04 db 4hfsStyle_04 db 0hbReserved_04 dw 1h dup (0)dwData_04 dd 0hiString_04 dd 0h

    iBitmap_05 dd 5hidCommand_05 dd 0C5hfsState_05 db 4hfsStyle_05 db 0hbReserved_05 dw 1h dup (0)dwData_05 dd 0hiString_05 dd 0h

    iBitmap_s1 dd 0h ;zero-based index of button imageidCommand_s1 dd 0h ;ID or, if fsStyle=TBSTYLE_SEP, zerofsState_s1 db 4h ;state flags,4h=TBSTATE_ENABLED

    fsStyle_s1 db 1h ;button style,1h=TBSTYLE_SEPbReserved_s1 dw 1h dup (0) ;reserved bytes,error in WIN32.HLP ?dwData_s1 dd 0h ;application-defined valueiString_s1 dd 0h ;zero-based index of button string

    Page 3

  • 8/10/2019 Td Win32asm 021.Asm

    4/21

    td_win32asm_021.asm

    iBitmap_06 dd 6h ;zero-based index of button imageidCommand_06 dd 0C6h ;ID of button, WM_COMMAND uMsg/wParamfsState_06 db 4h ;state flags,4h=TBSTATE_ENABLEDfsStyle_06 db 0h ;button style,0h=TBSTYLE_BUTTONbReserved_06 dw 1h dup (0) ;reserved bytes,error in WIN32.HLP ?dwData_06 dd 0h ;application-defined value

    iString_06 dd 0h ;zero-based index of button string

    iBitmap_07 dd 7hidCommand_07 dd 0C7hfsState_07 db 4hfsStyle_07 db 0hbReserved_07 dw 1h dup (0)dwData_07 dd 0hiString_07 dd 0h

    iBitmap_08 dd 8hidCommand_08 dd 0C8hfsState_08 db 4hfsStyle_08 db 0hbReserved_08 dw 1h dup (0)dwData_08 dd 0hiString_08 dd 0h

    iBitmap_09 dd 9hidCommand_09 dd 0C9hfsState_09 db 4h

    fsStyle_09 db 0hbReserved_09 dw 1h dup (0)dwData_09 dd 0hiString_09 dd 0h

    iBitmap_10 dd 0AhidCommand_10 dd 0CAhfsState_10 db 4hfsStyle_10 db 0hbReserved_10 dw 1h dup (0)

    dwData_10 dd 0hiString_10 dd 0h

    iBitmap_11 dd 0BhidCommand_11 dd 0CBhfsState_11 db 4hfsStyle_11 db 0hbReserved_11 dw 1h dup (0)dwData_11 dd 0hiString_11 dd 0h

    iBitmap_12 dd 0ChidCommand_12 dd 0CChfsState_12 db 4hfsStyle_12 db 0h

    Page 4

  • 8/10/2019 Td Win32asm 021.Asm

    5/21

  • 8/10/2019 Td Win32asm 021.Asm

    6/21

  • 8/10/2019 Td Win32asm 021.Asm

    7/21

  • 8/10/2019 Td Win32asm 021.Asm

    8/21

  • 8/10/2019 Td Win32asm 021.Asm

    9/21

  • 8/10/2019 Td Win32asm 021.Asm

    10/21

  • 8/10/2019 Td Win32asm 021.Asm

    11/21

  • 8/10/2019 Td Win32asm 021.Asm

    12/21

    td_win32asm_021.asm; API "SendMessageA", TB_SETBUTTONSIZE sets the size of the buttons to be added;------------------------------------------------------------------------------push 00140014h ;lParam, dxbutton, dybuttonpush 0h ;wParam, first message parameterpush 41Fh ;uMsg, send TB_SETBUTTONSIZE messagepush toolbar00_hWnd ;hwnd, handle of destination windowcall SendMessageA ;- API Function -

    jmp WP1_return

    TB_info_00:cmp eax,0FFFFFD44h;0-700-0 ;check if code TBN_GETBUTTONINFO recei.jne WP1_return_1mov eax,[ebx+12] ;check IItem, index !cmp eax,0hjne TB_info_01mov eax,iBitmap_00 ;fill TBBUTTON structure !mov [ebx+16],eaxmov eax,idCommand_00mov [ebx+20],eaxmov al,fsState_00mov [ebx+24],almov al,fsStyle_00mov [ebx+25],almov ax,bReserved_00mov [ebx+26],axmov eax,dwData_00mov [ebx+28],eaxmov eax,iString_00

    mov [ebx+32],eaxmov eax,6hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_00 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_01:cmp eax,1h ;check IItem, indexjne TB_info_02mov eax,iBitmap_01 ;fill TBBUTTON structure ...mov [ebx+16],eaxmov eax,idCommand_01mov [ebx+20],eaxmov al,fsState_01mov [ebx+24],almov al,fsStyle_01

    mov [ebx+25],almov ax,bReserved_01mov [ebx+26],axmov eax,dwData_01

    Page 12

  • 8/10/2019 Td Win32asm 021.Asm

    13/21

    td_win32asm_021.asmmov [ebx+28],eaxmov eax,iString_01mov [ebx+32],eaxmov eax,5hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer

    ;------------------------------------------------------------------------------push OFFSET toolbar00_str_01 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_02:cmp eax,2hjne TB_info_03mov eax,iBitmap_02mov [ebx+16],eaxmov eax,idCommand_02mov [ebx+20],eaxmov al,fsState_02mov [ebx+24],almov al,fsStyle_02mov [ebx+25],almov ax,bReserved_02mov [ebx+26],axmov eax,dwData_02mov [ebx+28],eax

    mov eax,iString_02mov [ebx+32],eaxmov eax,8hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_02 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_03:cmp eax,3hjne TB_info_04mov eax,iBitmap_03mov [ebx+16],eaxmov eax,idCommand_03mov [ebx+20],eaxmov al,fsState_03mov [ebx+24],al

    mov al,fsStyle_03mov [ebx+25],almov ax,bReserved_03mov [ebx+26],ax

    Page 13

  • 8/10/2019 Td Win32asm 021.Asm

    14/21

    td_win32asm_021.asmmov eax,dwData_03mov [ebx+28],eaxmov eax,iString_03mov [ebx+32],eaxmov eax,5hmov [ebx+36],eax;------------------------------------------------------------------------------

    ; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_03 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_04:cmp eax,4hjne TB_info_05mov eax,iBitmap_04mov [ebx+16],eaxmov eax,idCommand_04mov [ebx+20],eaxmov al,fsState_04mov [ebx+24],almov al,fsStyle_04mov [ebx+25],almov ax,bReserved_04mov [ebx+26],axmov eax,dwData_04

    mov [ebx+28],eaxmov eax,iString_04mov [ebx+32],eaxmov eax,4hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_04 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_05:cmp eax,5hjne TB_info_06mov eax,iBitmap_05mov [ebx+16],eaxmov eax,idCommand_05mov [ebx+20],eaxmov al,fsState_05

    mov [ebx+24],almov al,fsStyle_05mov [ebx+25],almov ax,bReserved_05

    Page 14

  • 8/10/2019 Td Win32asm 021.Asm

    15/21

    td_win32asm_021.asmmov [ebx+26],axmov eax,dwData_05mov [ebx+28],eaxmov eax,iString_05mov [ebx+32],eaxmov eax,6hmov [ebx+36],eax

    ;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_05 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_06:cmp eax,6hjne TB_info_07mov eax,iBitmap_06mov [ebx+16],eaxmov eax,idCommand_06mov [ebx+20],eaxmov al,fsState_06mov [ebx+24],almov al,fsStyle_06mov [ebx+25],almov ax,bReserved_06mov [ebx+26],ax

    mov eax,dwData_06mov [ebx+28],eaxmov eax,iString_06mov [ebx+32],eaxmov eax,6hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_06 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_07:cmp eax,7hjne TB_info_08mov eax,iBitmap_07 ;fill TBBUTTON structure !mov [ebx+16],eaxmov eax,idCommand_07mov [ebx+20],eax

    mov al,fsState_07mov [ebx+24],almov al,fsStyle_07mov [ebx+25],al

    Page 15

  • 8/10/2019 Td Win32asm 021.Asm

    16/21

    td_win32asm_021.asmmov ax,bReserved_07mov [ebx+26],axmov eax,dwData_07mov [ebx+28],eaxmov eax,iString_07mov [ebx+32],eaxmov eax,7h

    mov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_07 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_08:cmp eax,8h ;check IItem, indexjne TB_info_09mov eax,iBitmap_08 ;fill TBBUTTON structure ...mov [ebx+16],eaxmov eax,idCommand_08mov [ebx+20],eaxmov al,fsState_08mov [ebx+24],almov al,fsStyle_08mov [ebx+25],almov ax,bReserved_08

    mov [ebx+26],axmov eax,dwData_08mov [ebx+28],eaxmov eax,iString_08mov [ebx+32],eaxmov eax,6hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_08 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_09:cmp eax,9hjne TB_info_10mov eax,iBitmap_09mov [ebx+16],eaxmov eax,idCommand_09

    mov [ebx+20],eaxmov al,fsState_09mov [ebx+24],almov al,fsStyle_09

    Page 16

    d i 32 021

  • 8/10/2019 Td Win32asm 021.Asm

    17/21

    td_win32asm_021.asmmov [ebx+25],almov ax,bReserved_09mov [ebx+26],axmov eax,dwData_09mov [ebx+28],eaxmov eax,iString_09mov [ebx+32],eax

    mov eax,5hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_09 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_10:

    cmp eax,0Ahjne TB_info_11mov eax,iBitmap_10mov [ebx+16],eaxmov eax,idCommand_10mov [ebx+20],eaxmov al,fsState_10mov [ebx+24],almov al,fsStyle_10mov [ebx+25],al

    mov ax,bReserved_10mov [ebx+26],axmov eax,dwData_10mov [ebx+28],eaxmov eax,iString_10mov [ebx+32],eaxmov eax,9hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_10 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_11:cmp eax,0Bhjne TB_info_12mov eax,iBitmap_11mov [ebx+16],eax

    mov eax,idCommand_11mov [ebx+20],eaxmov al,fsState_11mov [ebx+24],al

    Page 17

    td win32asm 021 asm

  • 8/10/2019 Td Win32asm 021.Asm

    18/21

    td_win32asm_021.asmmov al,fsStyle_11mov [ebx+25],almov ax,bReserved_11mov [ebx+26],axmov eax,dwData_11mov [ebx+28],eaxmov eax,iString_11

    mov [ebx+32],eaxmov eax,7hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer;------------------------------------------------------------------------------push OFFSET toolbar00_str_11 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_12:cmp eax,0Chjne TB_info_13mov eax,iBitmap_12mov [ebx+16],eaxmov eax,idCommand_12mov [ebx+20],eaxmov al,fsState_12mov [ebx+24],almov al,fsStyle_12

    mov [ebx+25],almov ax,bReserved_12mov [ebx+26],axmov eax,dwData_12mov [ebx+28],eaxmov eax,iString_12mov [ebx+32],eaxmov eax,4hmov [ebx+36],eax;------------------------------------------------------------------------------; API "lstrcpy" copies a string to a buffer

    ;------------------------------------------------------------------------------push OFFSET toolbar00_str_12 ;lpString2, address of string to copypush [ebx+40] ;lpString1, address of buffercall lstrcpy ;- API Function -jmp WP1_return_1

    TB_info_13:cmp eax,0Dhjne WP1_return_0mov eax,iBitmap_13

    mov [ebx+16],eaxmov eax,idCommand_13mov [ebx+20],eaxmov al,fsState_13

    Page 18

  • 8/10/2019 Td Win32asm 021.Asm

    19/21

  • 8/10/2019 Td Win32asm 021.Asm

    20/21

    td win32asm 021.asm

  • 8/10/2019 Td Win32asm 021.Asm

    21/21

    td_win32asm_021.asmret;******************************************************************************

    ;==============================================================================; end Main = end of our program code;------------------------------------------------------------------------------end Main ;end of our program code, entry point

    ;==============================================================================; To create the exe file use this commands with your Microsoft Assembler/Linker;------------------------------------------------------------------------------; ml.exe /c /coff td_win32asm_021.asm ;asm command; rc.exe /v rsrc.rc ;rc command; cvtres.exe /machine:ix86 rsrc.res; link.exe /subsystem:windows td_win32asm_021.obj rsrc.obj ;link command;==============================================================================

    Page 21


Recommended