' *************************************************************************************
' Code Generated by EZGUI Professional Visual Designer 5.0
' Portions: Copyright Christopher R. Boss, 2003 to 2011 All Rights Reserved !
' Registered EZGUI 5.0 users may use generated code Royalty Free !
' *************************************************************************************
'
' -----------------------------------------------------------------------------------------
' WARNING ! Do Not Modify any code WITHIN Protected Sections !
' You can add code (Sub,Function,etc.) BEFORE any Protected Routine by using the following
' CODE TAGS: '<<SAVE>> '<<END>> and the Designer will not remove it.
' -----------------------------------------------------------------------------------------
'
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
'
#COMPILE EXE
#DIM ALL ' This is helpful to prevent errors in coding
' --------------------
#INCLUDE "C:\ezgui50pro\includes\ezgui50.inc" ' EZGUI Include file for Declares
' --------------------
' #RESOURCE ".\rcdata\MDIapp.pbr"
' *************************************************************************************
' *************************************************************************************
' Code Generator Defined Constants and Declares
' *************************************************************************************
DECLARE SUB OtherForm_Events
(FormName$
, CID&
, CMsg&
, CVal&
, Cancel&
) DECLARE SUB OtherForm_Design
(FormName$
) a
DECLARE FUNCTION PreProcess_Events
(FormName$
, CID&
, CMsg&
, CVal&
, Cancel&
) AS LONG DECLARE SUB EZ_MDIPARENT_ParseEvents
(CID&
, CMsg&
, CVal&
, Cancel&
) DECLARE SUB MDIPARENT_Events
(CID&
, CMsg&
, CVal&
, Cancel&
) ' ------------------------------------------------
' ----------------------------------------------------------
%MDIPARENT_MENUFILES = 9000
' ----------------------------------------------------------
%MDIPARENT_MENUNEW = 9005
%MDIPARENT_MENUOPEN = 9010
%MDIPARENT_MENUSAVE = 9015
%MDIPARENT_MENUCLOSE = 9020
%MDIPARENT_SEPARATOR_9025 = 9025
%MDIPARENT_MENUEXIT = 9030
' ----------------------------------------------------------
%MDIPARENT_MENUWIN = 9100
' ----------------------------------------------------------
%MDIPARENT_MENUTILE = 9105
%MDIPARENT_TOOLBAR1 = 50
%MDIPARENT_MDICLIENT1 = 25
%MDIPARENT_STATUSBAR = 105
DECLARE SUB MDIPARENT_TOOLBAR1_Events
(BYVAL TBarID&
, MyID&
, BYVAL ButtonN&
, CMsg&
, CVal&
, Cancel&
) DECLARE SUB EZ_MDICHILD_ParseEvents
(CID&
, CMsg&
, CVal&
, Cancel&
) DECLARE SUB MDICHILD_Events
(CID&
, CMsg&
, CVal&
, Cancel&
) ' ------------------------------------------------
%MDICHILD_TEXT1 = 100
DECLARE SUB MDICHILD_TEXT1_Events
(MyID&
, CMsg&
, CVal&
, Cancel&
)
' *************************************************************************************
' Code Generator Defined Global Variables and Types
' *************************************************************************************
' Note: Do NOT change the names of the EZGUI Callback Procedures !
' --------------------
#INCLUDE "C:\ezgui50pro\includes\ezwmain50.inc" ' EZGUI Include file for WinMain
' --------------------
' *************************************************************************************
' User Defined Global Variables and Types
' (Put code in CODE TAGS! to protect from deletion by Code Generator !)
' *************************************************************************************
SUB EZ_Main(VerNum&) ' (PROTECTED)
EZ_Reg %EZ_USER,%EZ_REGNUM
EZ_DefImageFolder "Graphics"
EZ_AllowCommandEvents 0
EZ_LoadImageLib ""
EZ_DefFont 6, "Arial", 10, "V"
EZ_DefFont 7, "Courier New", 10, "F"
EZ_DefFont 8, "Times New Roman", 10, "V"
EZ_DefFont 9, "Modern", 10, "V"
EZ_DefSystemColor 32, 4
EZ_DefSystemColor 33, 5
EZ_DefSystemColor 34, 15
EZ_DefSystemColor 35, 24
EZ_DefColorL 36, &H00B96FFF
EZ_DefColorL 37, &H0014AB9F
EZ_DefColorL 38, &H0047A7FF
EZ_DefColorL 39, &H00D2AACF
EZ_DefColorL 40, &H001CD5E3
EZ_DefColorL 41, &H00BC8943
EZ_DefColorL 42, &H006C6AB7
EZ_DefColorL 43, &H00DD4489
IF Main_Initialize(VerNum&) THEN
EZ_MDIPARENT_Display ""
' -------------------------------------------------------------------------------------
SUB EZ_DesignWindow(FormName$) ' (PROTECTED)
SELECT CASE FormName$
CASE "MDIPARENT"
EZ_MDIPARENT_Design
CASE "MDICHILD"
EZ_MDICHILD_Design
CASE ELSE
OtherForm_Design FormName$
' -------------------------------------------------------------------------------------
SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&) ' (PROTECTED)
IF PreProcess_Events
(FormName$
, CID&
, CMsg&
, CVal&
, Cancel&
) THEN EXIT SUB SELECT CASE FormName$
CASE "MDIPARENT"
EZ_MDIPARENT_ParseEvents CID&, CMsg&, CVal&, Cancel&
CASE "MDICHILD"
EZ_MDICHILD_ParseEvents CID&, CMsg&, CVal&, Cancel&
CASE ELSE
OtherForm_Events FormName$, CID&, CMsg&, CVal&, Cancel&
' -------------------------------------------------------------------------------------
' my library stuff
' *************************************************************************************
' Applications FORM Code
' *************************************************************************************
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
RV&=1
FUNCTION=RV&
SUB OtherForm_Design(FormName$)
SELECT CASE FormName$
CASE ELSE
SUB OtherForm_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)
SELECT CASE FormName$
CASE "{OPENDLG}", "{SAVEDLG}", "{OPENDLGX}", "{SAVEDLGX}", "{COLORDLG}", "{FONTDLG}", "{PRINTDLG}", "{PAGEDLG}", "{FINDDLG}"
CASE "{ABORTDLG}"
CASE "{MSGBOX}"
CASE ELSE
FUNCTION PreProcess_Events
(FormName$
, CID&
, CMsg&
, CVal&
, Cancel&
) AS LONG RV&=0
FUNCTION=RV&
'<<BEGINFORM>> "MDIPARENT"
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
SUB EZ_MDIPARENT_Display
(BYVAL FParent$
) ' (PROTECTED) ' Main Menu handle automatically stored by EZGUI
hMainMenu&=EZ_DefMainMenu( %MDIPARENT_MENUFILES, "&File", "")
EZ_Color -1, -1
EZ_Form "MDIPARENT", FParent$, "EZGUI Editor", 0, 0, 75, 25, "^_CZ{MDI-P}"
SUB EZ_MDIPARENT_Design() ' (PROTECTED)
LOCAL hMainMenu&
, hDropMenu&
, hSubMenu&
hMainMenu&=EZ_GetMenu("MDIPARENT", 0)
EZ_AddMenuItem hMainMenu&, %MDIPARENT_MENUWIN, 0, "&Windows", ""
hDropMenu&=EZ_DefSubMenu( %MDIPARENT_MENUNEW, "&New File", "")
EZ_SaveMenu "MDIPARENT", 1, hDropMenu&
EZ_SetSubMenu hMainMenu& , %MDIPARENT_MENUFILES, hDropMenu&
EZ_AddMenuItem hDropMenu&, %MDIPARENT_MENUOPEN, 0, "&Open File", ""
EZ_AddMenuItem hDropMenu&, %MDIPARENT_MENUSAVE, 0, "&Save File", ""
EZ_AddMenuItem hDropMenu&, %MDIPARENT_MENUCLOSE, 0, "&Close File", ""
EZ_AddMenuItem hDropMenu&, %MDIPARENT_SEPARATOR_9025, 0, "-", ""
EZ_AddMenuItem hDropMenu&, %MDIPARENT_MENUEXIT, 0, "E&xit", ""
hDropMenu&=EZ_DefSubMenu( %MDIPARENT_MENUTILE, "&Tile Windows", "M")
EZ_SaveMenu "MDIPARENT", 2, hDropMenu&
EZ_SetSubMenu hMainMenu& , %MDIPARENT_MENUWIN, hDropMenu&
' ------------------------------------------------
EZ_Color-1,-1
EZ_UseFont 4
IF PN1$ = "" THEN PN1$ = EZ_LoadPicture("%EZMTOOLBAR{S}")
EZ_UseAutoSize "CT"
EZ_Toolbar %MDIPARENT_TOOLBAR1, PN1$, "BBBB|0124{New|Open|Save|Close|}", "RT24X24"
' -----------------------------------------------
EZ_Color-1,-1
EZ_UseFont 4
EZ_MDIClient
' -----------------------------------------------
EZ_Color -1,-1
EZ_UseFont 4
EZ_AllowLoadingEvent 2
EZ_StatusBar %MDIPARENT_STATUSBAR, "", ""
EZ_ResizeMDI "MDIParent", 0, 4,0,0,1
EZ_AddAutoSize "MDIParent", 25, "CT"
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
'<<SAVE>>
IF Mode&=1 THEN
IF DIR$
(F$
)<>"" THEN KILL F$
T$=EZ_GetText("MDIChild",%MDICHILD_TEXT1)
ELSE
IF DIR$
(F$
)="" THEN EXIT SUB T$=""
IF Mode&=1 THEN
ELSE
EZ_SetText "MDIChild",%MDICHILD_TEXT1, T$
EZ_SetText "MDIChild",0, F$
SUB DoTextFile
(BYVAL Mode&
) SELECT CASE Mode&
CASE 0 ' New file
GOSUB TestForForm
EZ_SetText "MDIChild", %MDICHILD_TEXT1, ""
EZ_SetText "MDIChild", 0, "newtext.txt"
CASE 1 ' Open
GOSUB TestForForm
F$=EZ_OpenFile("MDIParent","Select Text File","", "Text (*.txt))|*.txt|All Files (*.*)|*.*|","Z")
IF F$<>"" THEN
DoFileAccess F$, 0
CASE 2,3 ' save
IF EZ_Handle("MDIChild",0)<>0 THEN
IF EZ_IsForm("MDIChild", "Min") THEN EZ_MaximizeForm "MDIChild"
AF$=EZ_GetText("MDIChild",0)
F$=EZ_SaveFile("MDIParent","Save Text File","", AF$, "Text (*.txt))|*.txt|All Files (*.*)|*.*|","txt", "PNIZ")
IF F$<>"" THEN
DoFileAccess F$, 1
IF Mode&=3 THEN EZ_UnloadForm "MDIChild"
TestForForm:
IF EZ_Handle("MDIChild",0)=0 THEN
EZ_MDIchild_Display "MDIParent", 0,0
EZ_MaximizeForm "MDIChild"
IF EZ_IsForm("MDIChild", "Min") THEN EZ_MaximizeForm "MDIChild"
RETURN
'<<END>>
SUB MDIPARENT_MenuEvents
(BYVAL MyID&
, CMsg&
, CVal&
, Cancel&
, BYVAL hMenu&
, BYVAL MenuText$
) SELECT CASE MyID&
CASE %MDIPARENT_MENUFILES
SELECT CASE CMsg&
CASE %EZ_Click
CASE %EZ_Selected
CASE %MDIPARENT_MENUNEW
SELECT CASE CMsg&
CASE %EZ_Click
DoTextFile 0
CASE %EZ_Selected
CASE %MDIPARENT_MENUOPEN
SELECT CASE CMsg&
CASE %EZ_Click
DoTextFile 1
CASE %EZ_Selected
CASE %MDIPARENT_MENUSAVE
SELECT CASE CMsg&
CASE %EZ_Click
DoTextFile 2
CASE %EZ_Selected
CASE %MDIPARENT_MENUCLOSE
SELECT CASE CMsg&
CASE %EZ_Click
DoTextFile 3
CASE %EZ_Selected
CASE %MDIPARENT_MENUEXIT
SELECT CASE CMsg&
CASE %EZ_Click
CASE %EZ_Selected
CASE %MDIPARENT_MENUWIN
SELECT CASE CMsg&
CASE %EZ_Click
CASE %EZ_Selected
CASE %MDIPARENT_MENUTILE
SELECT CASE CMsg&
CASE %EZ_Click
CASE %EZ_Selected
CASE ELSE
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
SUB EZ_MDIPARENT_ParseEvents(CID&, CMsg&, CVal&, Cancel&) ' (PROTECTED)
SELECT CASE CID&
CASE %EZ_Window
MDIPARENT_Events CID&, CMsg&, CVal&, Cancel&
CASE %MDIPARENT_MENUFILES
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 0), "&File"
CASE %MDIPARENT_MENUNEW
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 1), "&New File"
CASE %MDIPARENT_MENUOPEN
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 1), "&Open File"
CASE %MDIPARENT_MENUSAVE
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 1), "&Save File"
CASE %MDIPARENT_MENUCLOSE
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 1), "&Close File"
CASE %MDIPARENT_SEPARATOR_9025
CASE %MDIPARENT_MENUEXIT
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 1), "E&xit"
CASE %MDIPARENT_MENUWIN
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 0), "&Windows"
CASE %MDIPARENT_MENUTILE
MDIPARENT_MenuEvents CID&, CMsg&, CVal&, Cancel&, EZ_GetMenu("MDIPARENT", 2), "&Tile Windows"
CASE %MDIPARENT_TOOLBAR1
MDIPARENT_TOOLBAR1_Events CID&, CID&, 0, CMsg&, CVal&, Cancel& ' Main Toobar ID
CASE %MDIPARENT_TOOLBAR1+1 TO %MDIPARENT_TOOLBAR1+4
TBNum& = CID&- %MDIPARENT_TOOLBAR1
MDIPARENT_TOOLBAR1_Events %MDIPARENT_TOOLBAR1, CID&, TBNum&, CMsg&, CVal&, Cancel&
CASE ELSE
MDIPARENT_Events CID&, CMsg&, CVal&, Cancel&
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
SUB MDIPARENT_Events(CID&, CMsg&, CVal&, Cancel&)
SELECT CASE CID&
CASE %EZ_Window
SELECT CASE CMsg&
CASE %EZ_Loading
CASE %EZ_Loaded
EZ_SetFormIcon "MDIParent",EZ_LoadIcon("%EZEZ")
CASE %EZ_Started
EZ_MDIchild_Display "MDIParent", 0,0
EZ_MaximizeForm "MDIChild"
CASE %EZ_Size
EZ_ResizeMDI "MDIParent",0,0,0,0,1
CASE %EZ_Close
CASE ELSE
CASE ELSE
SUB MDIPARENT_TOOLBAR1_Events
( BYVAL TBarID&
, MyID&
, BYVAL ButtonN&
, CMsg&
, CVal&
, Cancel&
) SELECT CASE CMsg&
CASE %EZ_Click
DoTextFile ButtonN&-1
CASE ELSE
'<<BEGINFORM>> "MDICHILD"
' ======================================
' [PROTECTED CODE] Do NOT Edit !
' ======================================
SUB EZ_MDICHILD_Display
(BYVAL FParent$
, BYVAL AC!
, BYVAL AR!
) ' (PROTECTED) EZ_Color -1, -1
EZ_Form "MDICHILD", FParent$, "newtext.txt", AC!, AR!, 44, 17, "^_Z{MDI-C}"
SUB EZ_MDICHILD_Design() ' (PROTECTED)
EZ_Color-1,-1
EZ_UseIFont "Courier New", 16,"L+F"
EZ_UseAutoSize "CT"
EZ_Text %MDICHILD_TEXT1, 0, 0, 44, 17, "", "BEMSTV"
' -----------------------------------------------
SUB EZ_MDICHILD_ParseEvents(CID&, CMsg&, CVal&, Cancel&) ' (PROTECTED)
SELECT CASE CID&
CASE %EZ_Window
MDICHILD_Events CID&, CMsg&, CVal&, Cancel&
CASE %MDICHILD_TEXT1
MDICHILD_TEXT1_Events CID&, CMsg&, CVal&, Cancel&
CASE ELSE
MDICHILD_Events CID&, CMsg&, CVal&, Cancel&
' ======================================
' [USER ACCESSABLE CODE] You may Edit !
' ======================================
'<<SAVE>>
EZ_GetSize FormName$, W!, H!, 0
EZ_ResizeC FormName$, ID&,0,0, W!, H!
'<<END>>
SUB MDICHILD_Events(CID&, CMsg&, CVal&, Cancel&)
SELECT CASE CID&
CASE %EZ_Window
SELECT CASE CMsg&
CASE %EZ_Loading
CASE %EZ_Loaded
CASE %EZ_Focus
EZ_SetDlgMsgMode 0
CASE %EZ_NoFocus
EZ_SetDlgMsgMode 1
CASE %EZ_Started
CASE %EZ_Close
CASE %EZ_Size
ResizeTextBox "MDIChild", %MDICHILD_TEXT1
CASE ELSE
CASE ELSE
SUB MDICHILD_TEXT1_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Change
CASE ELSE
'<<END ALL FORMS>> UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END