include		windows.inc
include		user32.inc
include		kernel32.inc
include	    gdi32.inc
include     shell32.inc
include     masm32.inc

includelib	user32.lib
includelib	kernel32.lib
includelib  gdi32.lib
includelib  shell32.lib
includelib  masm32.lib

include	    XXControls.inc
includelib	XXControls.lib

include	    XXAbout.inc
includelib	XXAbout.lib

    include   \masm32\macros\macros.asm

$invoke MACRO Fun:REQ, A:VARARG
  IFB <A>
    invoke Fun
  ELSE
    invoke Fun, A
  ENDIF
  EXITM <eax>
        ENDM


WinMain		PROTO	:DWORD,:DWORD,:DWORD,:DWORD
DlgProc		PROTO	:HWND, :DWORD, :DWORD, :DWORD

.data
ClassName	db	"SimpleWinClass",0
AppName		db	"Our Main Window",0
DlgName		db	"MyDialog",0
lgFnt       LOGFONTA    <-13, 7, 0, 0, FW_LIGHT, 0, 0, 0, ANSI_CHARSET, OUT_RASTER_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, FF_MODERN, "Courier New">
lgFntFocus  LOGFONTA    <-13, 7, 0, 0, FW_BOLD, 0, TRUE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, FF_MODERN, "Courier New">
email_chib  db          "mailto:<XXControls@bk.ru>",0
wave_hover  db "IDW_HOVER",0

.data?
hInstance	HINSTANCE	?
CommandLine	LPSTR		?
iccex	    INITCOMMONCONTROLSEX <?>
hFnt        HFONT ?
hFntFocus   HFONT ?

hBmpNoiseNormal     HBITMAP ?
hBmpNoiseHover      HBITMAP ?
hBmpSoftBumpNormal  HBITMAP ?
hBmpSoftBumpHover   HBITMAP ?
hBmpVBumpNormal     HBITMAP ?
hBmpVBumpHover      HBITMAP ?
hBmpHBumpNormal     HBITMAP ?
hBmpHBumpHover      HBITMAP ?
hBmpHShadeNormal    HBITMAP ?
hBmpHShadeHover     HBITMAP ?
hBmpVShadeNormal    HBITMAP ?
hBmpVShadeHover     HBITMAP ?
hBmpDShadeNormal    HBITMAP ?
hBmpDShadeHover     HBITMAP ?
hBmpHardBumpNormal  HBITMAP ?
hBmpHardBumpHover   HBITMAP ?
hBmpMetalNormal     HBITMAP ?
hBmpMetalHover      HBITMAP ?

.const
IDC_BUTTONLEFT	equ 3002
IDC_BUTTONRIGHT	equ 3003
IDC_BUTTONTOP   equ 3004
IDC_SLEFT       equ 3005
IDC_SRIGHT      equ 3006
IDC_TEXT        equ 3007
IDC_DISABLED    equ 3008
IDC_FLATDISABLED equ 3009
IDC_LAMP        equ 3010
IDC_LAMP2       equ 3011
IDC_NTEXT       equ 3012
IDC_LINK        equ 3013
IDC_NOISE       equ 3014
IDC_SOFTBUMP    equ 3015
IDC_VBUMP       equ 3016
IDC_HBUMP       equ 3017
IDC_HSHADE      equ 3018
IDC_VSHADE      equ 3019
IDC_DIAGSHADE   equ 3020
IDC_HARDBUMP    equ 3021
IDC_METAL       equ 3022
IDC_USERBMP     equ 3023
IDC_EXIT        equ 3000
IDC_ABOUT       equ 3001
IDB_BITMAP  equ 100
IDI_CANSEL  equ 125
IDI_OK      equ 126
;IDI_EXIT    equ 127
IDI_ABOUT   equ 128
IDI_LEFT    equ 129
IDI_RIGHT   equ 130
IDI_LAMP1   equ 131
IDI_LAMP2   equ 132
IDW_HOVER   equ 200
ID_CUR1     equ 800