1 | /* $Id: defwndproc.cpp,v 1.17 2002-02-11 16:46:00 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 default window API functions for OS/2
|
---|
5 | *
|
---|
6 | * Copyright 1998 Sander van Leeuwen
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * TODO: Incomplete default window handlers + incorrect handler (defframe)
|
---|
10 | *
|
---|
11 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
12 | *
|
---|
13 | */
|
---|
14 | #include "user32.h"
|
---|
15 | #include "syscolor.h"
|
---|
16 | #include "win32wbase.h"
|
---|
17 | #include "win32dlg.h"
|
---|
18 |
|
---|
19 | #define DBG_LOCALLOG DBG_defwndproc
|
---|
20 | #include "dbglocal.h"
|
---|
21 |
|
---|
22 | //******************************************************************************
|
---|
23 | //******************************************************************************
|
---|
24 | LRESULT WIN32API DefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
---|
25 | {
|
---|
26 | Win32BaseWindow *window;
|
---|
27 | LRESULT result;
|
---|
28 |
|
---|
29 | window = Win32BaseWindow::GetWindowFromHandle(hwnd);
|
---|
30 | if(!window) {
|
---|
31 | dprintf(("DefWindowProcA, window %x not found", hwnd));
|
---|
32 | return 0;
|
---|
33 | }
|
---|
34 | result = window->DefWindowProcA(Msg, wParam, lParam);
|
---|
35 | RELEASE_WNDOBJ(window);
|
---|
36 | return result;
|
---|
37 | }
|
---|
38 | //******************************************************************************
|
---|
39 | //******************************************************************************
|
---|
40 | LRESULT WIN32API DefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
---|
41 | {
|
---|
42 | Win32BaseWindow *window;
|
---|
43 | LRESULT result;
|
---|
44 |
|
---|
45 | window = Win32BaseWindow::GetWindowFromHandle(hwnd);
|
---|
46 | if(!window) {
|
---|
47 | dprintf(("DefWindowProcW, window %x not found", hwnd));
|
---|
48 | return 0;
|
---|
49 | }
|
---|
50 | result = window->DefWindowProcW(Msg, wParam, lParam);
|
---|
51 | RELEASE_WNDOBJ(window);
|
---|
52 | return result;
|
---|
53 | }
|
---|
54 | //******************************************************************************
|
---|
55 | //******************************************************************************
|
---|
56 | LRESULT WIN32API DefDlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
---|
57 | {
|
---|
58 | Win32Dialog *dialog;
|
---|
59 | LRESULT result;
|
---|
60 |
|
---|
61 | dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
|
---|
62 | //TODO: Wrong check?
|
---|
63 | // if(!dialog || !dialog->IsDialog()) {
|
---|
64 | if(!dialog) {
|
---|
65 | dprintf(("DefDlgProcA, window %x not found", hwnd));
|
---|
66 | return 0;
|
---|
67 | }
|
---|
68 | if(dialog->IsDialog())
|
---|
69 | result = dialog->DefDlgProcA(Msg, wParam, lParam);
|
---|
70 | else result = dialog->DefWindowProcA(Msg, wParam, lParam);
|
---|
71 | RELEASE_WNDOBJ(dialog);
|
---|
72 | return result;
|
---|
73 | }
|
---|
74 | //******************************************************************************
|
---|
75 | //******************************************************************************
|
---|
76 | LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
---|
77 | {
|
---|
78 | Win32Dialog *dialog;
|
---|
79 | LRESULT result;
|
---|
80 |
|
---|
81 | dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
|
---|
82 | //TODO: Wrong check?
|
---|
83 | // if(!dialog || !dialog->IsDialog()) {
|
---|
84 | if(!dialog) {
|
---|
85 | dprintf(("DefDlgProcW, window %x not found", hwnd));
|
---|
86 | return 0;
|
---|
87 | }
|
---|
88 | if(dialog->IsDialog())
|
---|
89 | result = dialog->DefDlgProcW(Msg, wParam, lParam);
|
---|
90 | else result = dialog->DefWindowProcW(Msg, wParam, lParam);
|
---|
91 | RELEASE_WNDOBJ(dialog);
|
---|
92 | return result;
|
---|
93 | }
|
---|
94 | //******************************************************************************
|
---|
95 | //******************************************************************************
|
---|