home *** CD-ROM | disk | FTP | other *** search
- // Microworks ObjectMate 2.6
- //
- // ObjectMate Installation
- //
- // Copyright 1992-94 Microworks Sydney, Australia.
- //
- // MWINSTAL.H
-
- #include <windowsx.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <ctype.h>
- #include <dir.h>
- #include <dos.h>
- #include <lzexpand.h>
- #include <shellapi.h>
- #include <memory.h>
- #include <dde.h>
-
- // Control id's
-
- #define IDBITMAP 100
- #define IDEDITC4 101
- #define IDEDITPAS 102
- #define IDCHECKC4 103
- #define IDCHECKPAS 104
- #define IDCHECKRW 105
- #define IDCHECKPM 106
- #define IDGROUP 107
- #define IDSTATIC 108
- #define IDPERCENT 109
- #define IDPANEL 110
- #define IDINSTALL 201
- #define IDEXIT 202
- #define IDREAD 203
- #define IDRESTART 204
-
- // Resource string id's
-
- #define IDMINC4DIR 100
- #define IDMAXC4DIR 117
- #define IDMINPASDIR 200
- #define IDMAXPASDIR 215
- #define IDMINC4FILE 300
- #define IDMAXC4FILE 380
- #define IDMINPASFILE 400
- #define IDMAXPASFILE 431
-
- // Window functions
-
- LRESULT CALLBACK _export MainWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
- BOOL CALLBACK _export InstallDialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
- BOOL CALLBACK _export CompleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-
- // Application initialization functions
-
- BOOL RegisterWindows(HINSTANCE hInstance);
- BOOL InitInstance(const char far* cmdLine);
- BOOL InitMainWindow(HINSTANCE hInstance, int cmdShow);
- BOOL InitInstallDialog();
-
- // Support functions
-
- int CheckPaths();
- void DoInstallation();
- void EndInstallation();
- void ErrorMsg(char far* msg);
- int ExpandFile(char far* drive, char far* dir, char far* subDir, char far* fileName);
- int GetTotalFiles();
- void HourGlass(int on);
- int MakeDirectories();
- void PaintMainWindow(HDC dc);
- void SetDialogPos(HWND hDlg);
-
- // Program Manager DDE functions
-
- int InitiateDDE();
- int CreateGroup();
- void CreateItem(char far* exe, char far* desc, char far* iconFile, char far* iconNumber);
- void ExecuteDDE(char far* str);
- void NotifyDDE(LONG lValue);
- int TerminateDDE();
-
- // Global varibles - installation
-
- BOOL DllLoaded = FALSE;
- char SystemPath[MAXPATH];
- char SystemDrive[MAXDRIVE];
- char SystemDir[MAXDIR];
- char FromDrive[MAXDRIVE];
- char FromDir[MAXPATH];
- char ToC4Drive[MAXDRIVE];
- char ToC4Dir[MAXDIR];
- char ToPasDrive[MAXDRIVE];
- char ToPasDir[MAXDIR];
- DLGPROC DlgProc;
- HINSTANCE LZLib;
- HINSTANCE HInstance;
- HWND HMainWnd = 0;
- HWND HInstallDlg = 0;
- int FilesComplete = 0;
- int NumBaseFiles = 1;
- int NumC4Files = 83;
- int NumPasFiles = 34;
- UINT Percent = 0;
-
- // Global variables - Program Manager DDE
-
- ATOM AppAtom, TopicAtom;
- BOOL PMLaunched = FALSE;
- char Command[512];
- HGLOBAL HDDE;
- HWND PMWnd = 0;
- UINT DDEMessageSent;
-
-