HELLCTRL.H
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:2k
源码类别:
Windows编程
开发平台:
Visual 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
- #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
- // Menu-item IDs
- #define IDM_CREATEHELLO 300
- #define IDM_SETVISIBLE 301
- #define IDM_SETINVISIBLE 302
- #define IDM_GETHELLOMESSAGE 303
- #define IDM_SAYHELLO 304
- #define IDM_RELEASEHELLO 305
- // 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(IHello 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