source: trunk/include/wndproc.h@ 215

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

Spy and window message changes

File size: 1.8 KB
Line 
1/* $Id: wndproc.h,v 1.4 1999-06-26 13:21:53 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 LRESULT SendMessageA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam);
49
50 static BOOL FindWindowProc(Win32WindowProc *wndproc);
51
52 WNDPROC GetWin32Callback(){ return pCallback; };
53 void SetWin32Callback(WNDPROC pUserCallback)
54 {
55 pCallback = pUserCallback;
56 };
57 int IsWindow() { return fIsWindow; };
58
59Win32WindowClass *GetWindowClass() { return win32class; };
60
61private:
62
63 WNDPROC pCallback;
64 HWND hwnd;
65 DWORD threadid;
66 int fIsWindow;
67 DLGTEMPLATE *os2dlg;
68
69 Win32WindowClass *win32class;
70
71 static Win32WindowProc *windows;
72 Win32WindowProc *next;
73
74 friend LRESULT EXPENTRY_O32 WndCallback(HWND, UINT, WPARAM, LPARAM);
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.