source: trunk/include/wndproc.h@ 175

Last change on this file since 175 was 134, checked in by sandervl, 26 years ago

Parent notification changes

File size: 1.8 KB
Line 
1/* $Id: wndproc.h,v 1.3 1999-06-20 16:47:37 sandervl 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
30//Notify parent window of creation/destruction and buttondown messages (if required)
31void NotifyParent(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam);
32
33class Win32WindowProc
34{
35public:
36 Win32WindowProc(WNDPROC pUserCallback);
37 Win32WindowProc(WNDPROC pUserCallback, DLGTEMPLATE *os2dlg);
38 Win32WindowProc(HINSTANCE hinst, LPCSTR lpszClassName);
39 ~Win32WindowProc();
40
41 static WNDPROC_O32 GetOS2Callback();
42
43 static void DeleteWindow(HWND hwnd);
44 static Win32WindowProc *FindProc(HWND hwnd);
45 static Win32WindowProc *FindProc(HWND hwnd, DWORD threadid);
46 void SetWindowHandle(HWND hwndProc) { hwnd = hwndProc; };
47
48 static BOOL FindWindowProc(Win32WindowProc *wndproc);
49
50 WNDPROC GetWin32Callback(){ return pCallback; };
51 void SetWin32Callback(WNDPROC pUserCallback)
52 {
53 pCallback = pUserCallback;
54 };
55 int IsWindow() { return fIsWindow; };
56
57Win32WindowClass *GetWindowClass() { return win32class; };
58
59private:
60
61 WNDPROC pCallback;
62 HWND hwnd;
63 DWORD threadid;
64 int fIsWindow;
65 DLGTEMPLATE *os2dlg;
66
67 Win32WindowClass *win32class;
68
69 static Win32WindowProc *windows;
70 Win32WindowProc *next;
71
72 friend LRESULT EXPENTRY_O32 WndCallback(HWND, UINT, WPARAM, LPARAM);
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.