include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\gdi32.inc
include \masm32\include\Comctl32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\Comctl32.lib
;-------------------------------------------------------------------

include \masm32\include\masm32.inc
include \masm32\include\debug.inc
includeLib \masm32\lib\masm32.lib
includeLib \masm32\lib\debug.lib

includelib XXRichEdit.lib
include XXRichEdit.inc

includelib XXAbout.lib
include XXAbout.inc
;-------------------------------------------------------------------

include \masm32\MACROS\Macros.asm

;-------------------------------------------------------------------

Main PROTO
WndProc          PROTO :DWORD,:DWORD,:DWORD,:DWORD

;-------------------------------------------------------------------

$invoke MACRO Fun:REQ, A:VARARG
  IFB <A>
    invoke Fun
  else
    invoke Fun, A
  endif
  exitm <eax>
ENDM

;-------------------------------------------------------------------

.DATA
szClassName     DB "REdit32",0
szDisplayName   db "Print function",0
szRichLib       DB "RICHED20",0
szEditClass	    DB "RichEdit20A", 0
szFilter        DB "Rich Text Files",0,"*.RTF",0,"All Files",0,"*.*",0,0
szOpenTitle     DB "Open file...",0

;-------------------------------------------------------------------

.DATA?
hInstance	    HINSTANCE ?
CommandLine     LPSTR ?
hMainMenu       HMENU ?
hWnd            HWND ?
hWndEdit        HWND ?
editstream      EDITSTREAM <?> ; For EM_STREAMIN/EM_STREAMOUT
hFile           HFILE ?

m_psd           PAGESETUPDLG <?>

;-------------------------------------------------------------------

.CONST
MAINMENU            equ         600
IDM_OPEN            equ         1010
IDM_PAGE_SETUP      equ         1011
IDM_PRINT_PREVIEW   equ         1012
IDM_PRINT           equ         1013
IDM_EXIT            equ         1014
IDM_ABOUT           equ         1020

IDD_ABOUT           equ	        800

;-------------------------------------------------------------------

include FILEDLGS.ASM