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

Td Win32asm 013.Asm

Date post: 02-Jun-2018
Category:
Upload: z4rm4r
View: 219 times
Download: 0 times
Share this document with a friend
12
td_win32asm_013.asm ;============================================================================== ; Test Department's WINDOWS 32 BIT x86 ASSEMBLY example's 013 ;============================================================================== ;============================================================================== ; ==> Part 013 : Tab control class ;------------------------------------------------------------------------------ ; Hello everybody, ; here is my TAB control example. ; Like other win32asm example I show only the basics. ; ; The interesting thing for me was the SS_CENTERIMAGE style on a STATIC control. ; If the STATIC control is greater than the picture the rest of the ; STATIC control is filled with the picture color at coordinates 0,0. ; ; ; TD td@crahkob.com ; ;============================================================================== ; Assembler directives ;------------------------------------------------------------------------------ .386 ; the processor our program want run on .Model Flat ,StdCall ; always the same for Win9x (32 Bit) option casemap:none ; case sensitive !!! ;============================================================================== ; Include all files where API functins resist you want use, set correct path ;------------------------------------------------------------------------------ include D:\Masm32\include\windows.inc includelib kernel32.lib includelib user32.lib includelib comctl32.lib includelib gdi32.lib ;============================================================================== ; Declaration of used API functions,take a look into WIN32.HLP and *.inc files ;------------------------------------------------------------------------------ GetModuleHandleA PROTO :DWORD MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD InitCommonControls PROTO LoadIconA PROTO :DWORD,:DWORD LoadCursorA PROTO :DWORD,:DWORD RegisterClassExA PROTO :DWORD CreateSolidBrush PROTO :DWORD CreateWindowExA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,  :DWORD,:DWORD,:DWORD,:DWORD,:DWORD ShowWindow PROTO :DWORD,:DWORD UpdateWindow PROTO :DWORD GetMessageA PROTO :DWORD,:DWORD,:DWORD,:DWORD TranslateMessage PROTO :DWORD DispatchMessageA PROTO :DWORD PostQuitMessage PROTO :DWORD Page 1
Transcript
Page 1: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 1/12

td_win32asm_013.asm;==============================================================================; Test Department's WINDOWS 32 BIT x86 ASSEMBLY example's 013;==============================================================================

;==============================================================================; ==> Part 013 : Tab control class;------------------------------------------------------------------------------

; Hello everybody,; here is my TAB control example.; Like other win32asm example I show only the basics.;; The interesting thing for me was the SS_CENTERIMAGE style on a STATIC control.; If the STATIC control is greater than the picture the rest of the; STATIC control is filled with the picture color at coordinates 0,0.;;; TD [email protected]

;;==============================================================================; Assembler directives;------------------------------------------------------------------------------.386 ; the processor our program want run on.Model Flat ,StdCall ; always the same for Win9x (32 Bit)option casemap:none ; case sensitive !!!

;==============================================================================; Include all files where API functins resist you want use, set correct path

;------------------------------------------------------------------------------include D:\Masm32\include\windows.incincludelib kernel32.libincludelib user32.libincludelib comctl32.libincludelib gdi32.lib

;==============================================================================; Declaration of used API functions,take a look into WIN32.HLP and *.inc files;------------------------------------------------------------------------------

GetModuleHandleA PROTO :DWORDMessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORDInitCommonControls PROTOLoadIconA PROTO :DWORD,:DWORDLoadCursorA PROTO :DWORD,:DWORDRegisterClassExA PROTO :DWORDCreateSolidBrush PROTO :DWORDCreateWindowExA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,  :DWORD,:DWORD,:DWORD,:DWORD,:DWORDShowWindow PROTO :DWORD,:DWORDUpdateWindow PROTO :DWORD

GetMessageA PROTO :DWORD,:DWORD,:DWORD,:DWORDTranslateMessage PROTO :DWORDDispatchMessageA PROTO :DWORDPostQuitMessage PROTO :DWORD

Page 1

Page 2: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 2/12

Page 3: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 3/12

Page 4: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 4/12

Page 5: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 5/12

Page 6: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 6/12

Page 7: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 7/12

Page 8: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 8/12

Page 9: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 9/12

Page 10: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 10/12

Page 11: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 11/12

Page 12: Td Win32asm 013.Asm

8/10/2019 Td Win32asm 013.Asm

http://slidepdf.com/reader/full/td-win32asm-013asm 12/12

td_win32asm_013.asmpopad ;pop all register from stackmov eax,1h ;set EAX to TRUE (1)mov esp,ebp ;delete stack framepop ebpret 10h ;return and clear stack;##############################################################################

;******************************************************************************; My own subroutine(s) for a compacter code resist here ...;------------------------------------------------------------------------------My_CleanSystem:;------------------------------------------------------------------------------; API "DeleteObject" deletes a logical pen, brush, font, bitmap, region, or; palette, freeing all system resources associated with the object.; After the object is deleted, the specified handle is no longer valid.;------------------------------------------------------------------------------push hImg_static ;hObject, handle objectcall DeleteObject ;- API Function -ret;******************************************************************************

;==============================================================================; 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_013.asm ;asm command; rc.exe /v rsrc.rc ;rc command; cvtres.exe /machine:ix86 rsrc.res; link.exe /subsystem:windows td_win32asm_013.obj rsrc.obj ;link command;==============================================================================

Page 12


Recommended