1 //---------------------------------------------------------------------------
4 //---------------------------------------------------------------------------
6 /*------------------------------------------*/
8 /*------------------------------------------*/
9 #define USE_DDE 1 // Popup Search
\82Í
\81ADDE
\82Å
\8ds
\82¤,
10 // otherwise uses WM_COPYDATA message.
13 #define DDE_SERVICE_NAME "PDICU"
14 //#define REG_PDICEXE_OLD "Software\\ReliefOffice\\PDICU"
15 #define REG_PDICEXE "Software\\ReliefOffice\\PDIC2"
16 #define APPREGNAME "DokoPopU"
17 #define NAME_PDICEXE "PDICU.EXE"
18 #define NAME_DKPPTXT "DKPU.TXT"
19 #define NAME_DKPPHKDLL "DKPUHK.DLL"
20 #define NAME_BMPFILE "DKPU.BMP"
23 #define DDE_SERVICE_NAME "PDICW"
24 #define REG_PDICEXE "Software\\ReliefOffice\\PDICW32"
25 #define APPREGNAME "DokoPop"
26 #define NAME_PDICEXE "PDICW32.EXE"
27 #define NAME_DKPPTXT "DKPP.TXT"
28 #define NAME_DKPPHKDLL "DKPPHK.DLL"
29 #define NAME_BMPFILE "DKPP.BMP"
32 extern const char APPNAME[];
34 /*------------------------------------------*/
35 /* Type Definitions */
36 /*------------------------------------------*/
38 #define WMCD_EXISTCHECK 0x4000
40 #define WM_GET_VERSION (WM_APP+0x300)
42 #define foreach(obj, it, type) \
43 for (type::iterator it=(obj).begin();it!=(obj).end();it++)
47 #define VCL_SIZEABLE() do {BorderStyle = bsSizeable;} while(0) //TODO: VCL Bug
53 TMyIni( HKEY root, const char *soft, bool can_create );
55 void WriteInteger( const char *section, const char *key, int val );
56 int ReadInteger( const char *section, const char *key, int val );
57 void WriteString( const char *section, const char *key, const char *str );
58 AnsiString ReadString( const char *section, const char *key, const char *str );
59 void ReadValues( const char *section, TStrings *strs );
62 class TAppIni : public TMyIni {
68 void LoadForm( const char *section, TForm *form, HWND hwnd );
69 void SaveForm( const char *section, TForm *form, HWND hwnd );
72 /*------------------------------------------*/
74 /*------------------------------------------*/
79 void TerminateAMODI();
82 bool CheckPassword( const char *str );
84 void MoveToTop( HWND hwnd );
85 void MoveCenter( HWND hwnd, HWND hwndParent );
86 void GetScreenSize(HWND hwndBase, RECT *rcWork, RECT *rcScreen=NULL);
87 bool _WinExec( const char *cmd, int show, int waittime, const char *dir=NULL);
88 HANDLE WinExecEx( const char *cmd, int show, const char *dir=NULL, const char *title=NULL );
89 HWND FindApp(const char *clsname, const char *wndname, const char *appname);
91 int CheckVersion(HWND hwnd);
93 HWND FindPopupWindow( );
95 void ShowManual( HWND hwnd );
96 void ShowLatestVersion();
98 unsigned GetDNFVersion(); // get .NET Framework version
100 void dbw( const char *format, ... );
108 /*------------------------------------------*/
109 /* Global Variables */
110 /*------------------------------------------*/
111 extern const char *AppName;
112 extern const char *StrVersion;
113 extern int VersionValue;
114 extern bool WindowsNT;