|
|
1.1 root 1: /*
2: * WIN1632.H
3: *
4: * Macros and other definitions that assist in porting between Win16
5: * and Win32 applications. Define WIN32 to enable 32-bit versions.
6: *
7: * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
8: *
9: * Kraig Brockschmidt, Software Design Engineer
10: * Microsoft Systems Developer Relations
11: *
12: * Internet : [email protected]
13: * Compuserve: INTERNET>[email protected]
14: */
15:
16:
17: #ifndef _WIN1632_H_
18: #define _WIN1632_H_
19:
20: //Macros to handle control message packing between Win16 and Win32
21: #ifdef WIN32
22:
23: #define EXPORT
24: #define MAKEPOINT MAKEPOINTS
25:
26: #ifndef COMMANDPARAMS
27: #define COMMANDPARAMS(wID, wCode, hWndMsg) \
28: WORD wID = LOWORD(wParam); \
29: WORD wCode = HIWORD(wParam); \
30: HWND hWndMsg = (HWND)(UINT)lParam;
31: #endif //COMMANDPARAMS
32:
33: #ifndef SendCommand
34: #define SendCommand(hWnd, wID, wCode, hControl) \
35: SendMessage(hWnd, WM_COMMAND, MAKELONG(wID, wCode) \
36: , (LPARAM)hControl)
37: #endif //SendCommand
38:
39: #ifndef MENUSELECTPARAMS
40: #define MENUSELECTPARAMS(wID, wFlags, hMenu) \
41: WORD wID = LOWORD(wParam); \
42: WORD wFlags = HIWORD(wParam); \
43: HMENU hMenu = (HMENU)lParam;
44: #endif //MENUSELECTPARAMS
45:
46:
47: #ifndef SendMenuSelect
48: #define SendMenuSelect(hWnd, wID, wFlags, hMenu) \
49: SendMessage(hWnd, WM_MENUSELECT, (WPARAM)MAKELONG(wID, wFlags) \
50: , (LPARAM)hMenu)
51: #endif //SendMenuSelect
52:
53: #else //Start !WIN32
54:
55: #define EXPORT __export
56:
57: #ifndef COMMANDPARAMS
58: #define COMMANDPARAMS(wID, wCode, hWndMsg) \
59: WORD wID = LOWORD(wParam); \
60: WORD wCode = HIWORD(lParam); \
61: HWND hWndMsg = (HWND)(UINT)lParam;
62: #endif //COMMANDPARAMS
63:
64: #ifndef SendCommand
65: #define SendCommand(hWnd, wID, wCode, hControl) \
66: SendMessage(hWnd, WM_COMMAND, wID \
67: , MAKELONG(hControl, wCode))
68: #endif //SendCommand
69:
70: #ifndef MENUSELECTPARAMS
71: #define MENUSELECTPARAMS(wID, wFlags, hMenu) \
72: WORD wID = LOWORD(wParam); \
73: WORD wFlags = LOWORD(lParam); \
74: HMENU hMenu = (HMENU)HIWORD(lParam);
75: #endif //MENUSELECTPARAMS
76:
77: #ifndef SendMenuSelect
78: #define SendMenuSelect(hWnd, wID, wFlags, hMenu) \
79: SendMessage(hWnd, WM_MENUSELECT, wID \
80: , MAKELONG(wFlags, hMenu))
81: #endif //SendMenuSelect
82:
83:
84: #endif //!WIN32
85:
86: #endif //_WIN1632_H_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.