55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
|
#ifdef WIN32
|
||
|
|
||
|
#ifdef UNICODE
|
||
|
#define FROM_OLE_STRING(str) str
|
||
|
#define TO_OLE_STRING(str) str
|
||
|
#else
|
||
|
#define FROM_OLE_STRING(str) ConvertToAnsi(str)
|
||
|
char* ConvertToAnsi(OLECHAR FAR* szW);
|
||
|
#define TO_OLE_STRING(str) ConvertToUnicode(str)
|
||
|
OLECHAR* ConvertToUnicode(char FAR* szA);
|
||
|
// Maximum length of string that can be converted between Ansi & Unicode
|
||
|
#define STRCONVERT_MAXLEN 500
|
||
|
#endif
|
||
|
|
||
|
#else // WIN16
|
||
|
//#include <tchar.h>
|
||
|
|
||
|
|
||
|
#define APIENTRY far pascal
|
||
|
#define TCHAR char
|
||
|
#define TEXT(sz) sz
|
||
|
#define FROM_OLE_STRING(str) str
|
||
|
#define TO_OLE_STRING(str) str
|
||
|
#define LPTSTR LPSTR
|
||
|
#define LPCTSTR LPCSTR
|
||
|
|
||
|
|
||
|
// Windows NT defines the following in windowsx.h
|
||
|
#define GET_WM_COMMAND_ID(w,l) (w)
|
||
|
#define GET_WM_COMMAND_CMD(w,l) HIWORD(l)
|
||
|
#define GET_WM_COMMAND_HWND(w,l) LOWORD(l)
|
||
|
#endif
|
||
|
|
||
|
|
||
|
|
||
|
// MAX len of string table entries
|
||
|
#define STR_LEN 100
|
||
|
|
||
|
// String table constants
|
||
|
#define IDS_PROGNAME 1
|
||
|
#define IDS_RESULT 2
|
||
|
#define IDS_ERROR 3
|
||
|
|
||
|
// Function prototypes
|
||
|
int PASCAL WinMain (HINSTANCE, HINSTANCE, LPSTR, int);
|
||
|
BOOL InitApplication (HINSTANCE);
|
||
|
BOOL InitInstance (HINSTANCE, int);
|
||
|
void DisplayError(IRegWizCtrl FAR* phello);
|
||
|
#ifdef WIN16
|
||
|
LRESULT __export CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||
|
#else
|
||
|
LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||
|
#endif
|
||
|
|