numbmphandles		=	0
numbtnstructs		=	0

BTNCONTROL		STRUCT
	hWnd		dd	?
	hBmpUp		dd	?
	hBmpDown	dd	?
BTNCONTROL		ENDS

BMPCONTROL		STRUCT
	hWnd		dd	?
	hBmp		dd	?
BMPCONTROL		ENDS

.code

cedit			MACRO	name,x,y,cx,cy,style:=<0>

.data
hEdit&name		dd	?

.code

			invoke	procCEdit,addr hEdit&name,hwnd,x,y,cx,cy,style

ENDM

cbutton			MACRO	name,x,y,cx,cy,idBmpUp,idBmpDown

numbmphandles		=	numbmphandles + 2
numbtnstructs		=	numbtnstructs + 1

.data
stBtn&name		BTNCONTROL <?>

.code

			invoke	procCButton,addr stBtn&name,hwnd,x,y,cx,cy,idBmpUp,idBmpDown
			mov	dword ptr [dtBmpHandles + (numbmphandles-2)*4],eax
			mov	dword ptr [dtBmpHandles + (numbmphandles-1)*4],ebx
			mov	dword ptr [dtBtnPtr + (numbtnstructs-1)*4],edi

ENDM

cbmp			MACRO	name,x,y,idBmp

numbmphandles		=	numbmphandles + 1

.data
stBmp&name		BMPCONTROL <?>

.code

			invoke	procCBmp,addr stBmp&name,hwnd,x,y,idBmp
			mov	dword ptr [dtBmpHandles + (numbmphandles-1)*4],eax

ENDM
