| 1 | /* $Id: win32wnd.h,v 1.1 1999-05-24 20:20:05 ktk Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef __WIN32WND_H__
|
|---|
| 4 | #define __WIN32WND_H__
|
|---|
| 5 |
|
|---|
| 6 | #ifdef __cplusplus
|
|---|
| 7 |
|
|---|
| 8 | #include "win32class.h"
|
|---|
| 9 |
|
|---|
| 10 | #define WIN2OS2HWND(a) (a^a)
|
|---|
| 11 | #define OS22WINHWND(a) (a^a)
|
|---|
| 12 |
|
|---|
| 13 | //Win32 window message handler
|
|---|
| 14 | typedef LRESULT (* WIN32API WINWNDPROC) ( HWND, UINT, WPARAM, LPARAM );
|
|---|
| 15 |
|
|---|
| 16 | class Win32Window
|
|---|
| 17 | {
|
|---|
| 18 | public:
|
|---|
| 19 | Win32Window(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
|---|
| 20 | virtual ~Win32Window();
|
|---|
| 21 |
|
|---|
| 22 | MRESULT ProcessMessage(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
|---|
| 23 |
|
|---|
| 24 | virtual BOOL SetWindowLong(int index, ULONG value);
|
|---|
| 25 | virtual ULONG GetWindowLong(int index);
|
|---|
| 26 |
|
|---|
| 27 | BOOL PostMessageA(HWND hwnd, ULONG msg, WPARAM wParam, LPARAM lParam);
|
|---|
| 28 | BOOL PostMessageW(HWND hwnd, ULONG msg, WPARAM wParam, LPARAM lParam);
|
|---|
| 29 |
|
|---|
| 30 | Win32WndClass *getClass() { return windowClass; };
|
|---|
| 31 |
|
|---|
| 32 | protected:
|
|---|
| 33 | HWND OS2Hwnd;
|
|---|
| 34 | HWND Win32Hwnd;
|
|---|
| 35 | BOOL isUnicode;
|
|---|
| 36 |
|
|---|
| 37 | int posx, posy, width, height;
|
|---|
| 38 |
|
|---|
| 39 | // values normally contained in the standard window words
|
|---|
| 40 | ULONG ExtendedWindowStyle; //GWL_EXSTYLE
|
|---|
| 41 | ULONG WindowStyle; //GWL_STYLE
|
|---|
| 42 | //ptr to WINWNDPROC in windowClass
|
|---|
| 43 | WINWNDPROC *win32wndproc; //GWL_WNDPROC
|
|---|
| 44 | ULONG hInstance; //GWL_HINSTANCE
|
|---|
| 45 | HWND hwndParent; //GWL_HWNDPARENT
|
|---|
| 46 | ULONG windowId; //GWL_ID
|
|---|
| 47 | ULONG userData; //GWL_USERDATA
|
|---|
| 48 |
|
|---|
| 49 | char *windowText;
|
|---|
| 50 | ULONG wndTextLength;
|
|---|
| 51 |
|
|---|
| 52 | ULONG *UserWindowLong;
|
|---|
| 53 | ULONG nrUserWindowLong;
|
|---|
| 54 |
|
|---|
| 55 | Win32WndClass *windowClass;
|
|---|
| 56 |
|
|---|
| 57 | Win32Window *parent;
|
|---|
| 58 | Win32Window *child;
|
|---|
| 59 | Win32Window *nextchild;
|
|---|
| 60 |
|
|---|
| 61 | private:
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 | };
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | #endif //__cplusplus
|
|---|
| 68 |
|
|---|
| 69 | #endif //__WIN32WND_H__
|
|---|