; #########################################################################
;包含库
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\gdi32.inc
szText MACRO Name, Text:VARARG
LOCAL lbl
jmp lbl
Name db Text,0
lbl:
ENDM
m2m MACRO M1, M2
push M2
pop M1
ENDM
return MACRO arg
mov eax, arg
ret
ENDM
;=================
; Local prototypes
;=================
;定义API
WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
TopXY PROTO :DWORD,:DWORD
Paint_Proc PROTO :DWORD, hDC:DWORD
Frame3D PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
PushButton PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
;定义变量
.data
szDisplayName db "3D Frames",0
CommandLine dd 0
hWnd dd 0
hInstance dd 0
; --------------------------------------------------------
; The following 2 calls draw the border around the buttons
; --------------------------------------------------------
invoke Frame3D,hDC,btn_lo,btn_hi,340,20,460,125,2
invoke Frame3D,hDC,btn_hi,btn_lo,337,17,463,128,2
; -----------------------------------------------------
; The following 2 calls draw the left window frame area
; -----------------------------------------------------
invoke Frame3D,hDC,btn_lo,btn_hi,17,17,328,290,2
invoke Frame3D,hDC,btn_hi,btn_lo,20,20,325,287,1
; ----------------------------------------------------------
; The following code draws the border around the client area
; ----------------------------------------------------------
invoke GetClientRect,hWin,ADDR Rct
add Rct.left, 1
add Rct.top, 1
sub Rct.right, 1
sub Rct.bottom, 1