source: trunk/include/wndproc.h@ 10

Last change on this file since 10 was 10, checked in by phaller, 26 years ago

Experimental support vor EMX/GCC 0.9d as build environment. IBM VAC++ 3 remains default. (SET CCENV=VAC3 or EMX)

File size: 1.6 KB
Line 
1/* $Id: wndproc.h,v 1.2 1999-05-27 15:18:00 phaller Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 */
8/*
9 * Win32 Window procedure class
10 *
11 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
12 *
13 */
14#ifndef __WNDPROC_H__
15#define __WNDPROC_H__
16
17#ifdef _OS2WIN_H
18#include <winos2def.h>
19#endif
20
21#include "wndclass.h"
22
23//forward decl
24class Win32WindowProc;
25
26//used in COMDLG32.DLL
27Win32WindowProc *SYSTEM CreateWindowProc(WNDPROC pUserCallback);
28LRESULT EXPENTRY_O32 WndCallback(HWND, UINT, WPARAM, LPARAM);
29
30class Win32WindowProc
31{
32public:
33 Win32WindowProc(WNDPROC pUserCallback);
34 Win32WindowProc(WNDPROC pUserCallback, DLGTEMPLATE *os2dlg);
35 Win32WindowProc(HINSTANCE hinst, LPCSTR lpszClassName);
36 ~Win32WindowProc();
37
38 static WNDPROC_O32 GetOS2Callback();
39
40 static void DeleteWindow(HWND hwnd);
41 static Win32WindowProc *FindProc(HWND hwnd);
42 void SetWindowHandle(HWND hwndProc) { hwnd = hwndProc; };
43
44 static BOOL FindWindowProc(Win32WindowProc *wndproc);
45
46 WNDPROC GetWin32Callback(){ return pCallback; };
47 void SetWin32Callback(WNDPROC pUserCallback)
48 {
49 pCallback = pUserCallback;
50 };
51 int IsWindow() { return fIsWindow; };
52
53Win32WindowClass *GetWindowClass() { return win32class; };
54
55private:
56
57 WNDPROC pCallback;
58 HWND hwnd;
59 DWORD threadid;
60 int fIsWindow;
61 DLGTEMPLATE *os2dlg;
62
63 Win32WindowClass *win32class;
64
65 static Win32WindowProc *windows;
66 Win32WindowProc *next;
67
68 friend LRESULT EXPENTRY_O32 WndCallback(HWND, UINT, WPARAM, LPARAM);
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.