home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / mwinstal.h_ / mwinstal.h
Encoding:
C/C++ Source or Header  |  1994-09-06  |  3.0 KB  |  116 lines

  1. //    Microworks ObjectMate  2.6
  2. //
  3. //    ObjectMate Installation
  4. //
  5. //    Copyright 1992-94 Microworks Sydney, Australia.
  6. //
  7. //    MWINSTAL.H
  8.  
  9. #include <windowsx.h>
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <ctype.h>
  13. #include <dir.h>
  14. #include <dos.h>
  15. #include <lzexpand.h>
  16. #include <shellapi.h>
  17. #include <memory.h>
  18. #include <dde.h>
  19.  
  20. //    Control id's
  21.  
  22. #define IDBITMAP     100
  23. #define IDEDITC4     101
  24. #define IDEDITPAS    102
  25. #define IDCHECKC4    103
  26. #define IDCHECKPAS   104
  27. #define IDCHECKRW    105
  28. #define IDCHECKPM    106
  29. #define IDGROUP      107
  30. #define IDSTATIC     108
  31. #define IDPERCENT    109
  32. #define IDPANEL      110
  33. #define IDINSTALL    201
  34. #define IDEXIT       202
  35. #define IDREAD       203
  36. #define IDRESTART    204
  37.  
  38. //    Resource string id's
  39.  
  40. #define IDMINC4DIR   100
  41. #define IDMAXC4DIR   117
  42. #define IDMINPASDIR  200
  43. #define IDMAXPASDIR  215
  44. #define IDMINC4FILE  300
  45. #define IDMAXC4FILE  380
  46. #define IDMINPASFILE 400
  47. #define IDMAXPASFILE 431
  48.  
  49. //    Window functions
  50.  
  51. LRESULT CALLBACK _export MainWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  52. BOOL CALLBACK _export InstallDialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  53. BOOL CALLBACK _export CompleteDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  54.  
  55. //    Application initialization functions
  56.  
  57. BOOL      RegisterWindows(HINSTANCE hInstance);
  58. BOOL      InitInstance(const char far* cmdLine);
  59. BOOL      InitMainWindow(HINSTANCE hInstance, int cmdShow);
  60. BOOL      InitInstallDialog();
  61.  
  62. //    Support functions
  63.  
  64. int       CheckPaths();
  65. void      DoInstallation();
  66. void      EndInstallation();
  67. void      ErrorMsg(char far* msg);
  68. int       ExpandFile(char far* drive, char far* dir, char far* subDir, char far* fileName);
  69. int       GetTotalFiles();
  70. void      HourGlass(int on);
  71. int       MakeDirectories();
  72. void      PaintMainWindow(HDC dc);
  73. void      SetDialogPos(HWND hDlg);
  74.  
  75. //    Program Manager DDE functions
  76.  
  77. int       InitiateDDE();
  78. int       CreateGroup();
  79. void      CreateItem(char far* exe, char far* desc, char far* iconFile, char far* iconNumber);
  80. void      ExecuteDDE(char far* str);
  81. void      NotifyDDE(LONG lValue);
  82. int       TerminateDDE();
  83.  
  84. //    Global varibles - installation
  85.  
  86. BOOL      DllLoaded = FALSE;
  87. char      SystemPath[MAXPATH];
  88. char      SystemDrive[MAXDRIVE];
  89. char      SystemDir[MAXDIR];
  90. char      FromDrive[MAXDRIVE];
  91. char      FromDir[MAXPATH];
  92. char      ToC4Drive[MAXDRIVE];
  93. char      ToC4Dir[MAXDIR];
  94. char      ToPasDrive[MAXDRIVE];
  95. char      ToPasDir[MAXDIR];
  96. DLGPROC   DlgProc;
  97. HINSTANCE LZLib;
  98. HINSTANCE HInstance;
  99. HWND      HMainWnd = 0;
  100. HWND      HInstallDlg = 0;
  101. int       FilesComplete = 0;
  102. int       NumBaseFiles = 1;
  103. int       NumC4Files = 83;  
  104. int       NumPasFiles = 34; 
  105. UINT      Percent = 0;
  106.  
  107. //    Global variables - Program Manager DDE
  108.  
  109. ATOM      AppAtom, TopicAtom;
  110. BOOL      PMLaunched = FALSE;
  111. char      Command[512];           
  112. HGLOBAL      HDDE;
  113. HWND      PMWnd = 0;
  114. UINT      DDEMessageSent;
  115.  
  116.