source: trunk/src/user32/defwndproc.cpp@ 4

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

File size: 7.0 KB
Line 
1/* $Id: defwndproc.cpp,v 1.1 1999-05-24 20:20:01 ktk Exp $ */
2
3/*
4 * Win32 default window API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include "user32.h"
13#include "syscolor.h"
14
15//******************************************************************************
16//******************************************************************************
17LRESULT WIN32API DefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
18{
19#ifdef DEBUG
20//// WriteLog("DEFWNDPROC ");
21//// WriteLog("*DWP*");
22#endif
23 switch(Msg) {
24 case WM_NCCREATE://SvL: YAFMO (yet another feature missing in Open32)
25 return(TRUE);
26 case WM_CTLCOLORMSGBOX:
27 case WM_CTLCOLOREDIT:
28 case WM_CTLCOLORLISTBOX:
29 case WM_CTLCOLORBTN:
30 case WM_CTLCOLORDLG:
31 case WM_CTLCOLORSTATIC:
32 case WM_CTLCOLORSCROLLBAR:
33 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
34 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
35 return GetSysColorBrush(COLOR_BTNFACE);
36
37 default:
38 return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
39 }
40}
41//******************************************************************************
42//NOTE: Unicode msg translation!
43//******************************************************************************
44LRESULT WIN32API DefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
45{
46#ifdef DEBUG
47//// WriteLog("*DWPW*");
48#endif
49 switch(Msg) {
50 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
51 return(TRUE);
52 case WM_CTLCOLORMSGBOX:
53 case WM_CTLCOLOREDIT:
54 case WM_CTLCOLORLISTBOX:
55 case WM_CTLCOLORBTN:
56 case WM_CTLCOLORDLG:
57 case WM_CTLCOLORSTATIC:
58 case WM_CTLCOLORSCROLLBAR:
59 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
60 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
61 return GetSysColorBrush(COLOR_BTNFACE);
62
63 default:
64 return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
65 }
66}
67//******************************************************************************
68//******************************************************************************
69LRESULT WIN32API DefDlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
70{
71#ifdef DEBUG
72//// WriteLog("*DDP*");
73#endif
74 switch(Msg) {
75 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
76 return(TRUE);
77 case WM_CTLCOLORMSGBOX:
78 case WM_CTLCOLOREDIT:
79 case WM_CTLCOLORLISTBOX:
80 case WM_CTLCOLORBTN:
81 case WM_CTLCOLORDLG:
82 case WM_CTLCOLORSTATIC:
83 case WM_CTLCOLORSCROLLBAR:
84 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
85 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
86 return GetSysColorBrush(COLOR_BTNFACE);
87
88 default:
89 return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
90 }
91}
92//******************************************************************************
93//NOTE: Unicode msg translation!
94//******************************************************************************
95LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
96{
97#ifdef DEBUG
98//// WriteLog("*DDPW*");
99#endif
100 switch(Msg) {
101 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
102 return(TRUE);
103 case WM_CTLCOLORMSGBOX:
104 case WM_CTLCOLOREDIT:
105 case WM_CTLCOLORLISTBOX:
106 case WM_CTLCOLORBTN:
107 case WM_CTLCOLORDLG:
108 case WM_CTLCOLORSTATIC:
109 case WM_CTLCOLORSCROLLBAR:
110 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
111 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
112 return GetSysColorBrush(COLOR_BTNFACE);
113
114 default:
115 return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
116 }
117}
118//******************************************************************************
119//******************************************************************************
120LRESULT WIN32API DefFrameProcA(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam)
121{
122#ifdef DEBUG
123//// WriteLog("*DFP*");
124#endif
125 switch(Msg) {
126 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
127 return(TRUE);
128 case WM_CTLCOLORMSGBOX:
129 case WM_CTLCOLOREDIT:
130 case WM_CTLCOLORLISTBOX:
131 case WM_CTLCOLORBTN:
132 case WM_CTLCOLORDLG:
133 case WM_CTLCOLORSTATIC:
134 case WM_CTLCOLORSCROLLBAR:
135 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
136 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
137 return GetSysColorBrush(COLOR_BTNFACE);
138
139 default:
140 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);
141 }
142}
143//******************************************************************************
144//NOTE: Unicode msg translation!
145//******************************************************************************
146LRESULT WIN32API DefFrameProcW(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam)
147{
148#ifdef DEBUG
149//// WriteLog("*DFPW*");
150#endif
151 switch(Msg) {
152 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
153 return(TRUE);
154 case WM_CTLCOLORMSGBOX:
155 case WM_CTLCOLOREDIT:
156 case WM_CTLCOLORLISTBOX:
157 case WM_CTLCOLORBTN:
158 case WM_CTLCOLORDLG:
159 case WM_CTLCOLORSTATIC:
160 case WM_CTLCOLORSCROLLBAR:
161 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
162 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
163 return GetSysColorBrush(COLOR_BTNFACE);
164
165 default:
166 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);
167 }
168}
169//******************************************************************************
170//******************************************************************************
171LRESULT WIN32API DefMDIChildProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
172{
173#ifdef DEBUG
174//// WriteLog("*DMP*");
175#endif
176 switch(Msg) {
177 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
178 return(TRUE);
179 case WM_CTLCOLORMSGBOX:
180 case WM_CTLCOLOREDIT:
181 case WM_CTLCOLORLISTBOX:
182 case WM_CTLCOLORBTN:
183 case WM_CTLCOLORDLG:
184 case WM_CTLCOLORSTATIC:
185 case WM_CTLCOLORSCROLLBAR:
186 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
187 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
188 return GetSysColorBrush(COLOR_BTNFACE);
189
190 default:
191 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
192 }
193}
194//******************************************************************************
195//NOTE: Unicode msg translation!
196//******************************************************************************
197LRESULT WIN32API DefMDIChildProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
198{
199#ifdef DEBUG
200//// WriteLog("*DMPW*");
201#endif
202 switch(Msg) {
203 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
204 return(TRUE);
205 case WM_CTLCOLORMSGBOX:
206 case WM_CTLCOLOREDIT:
207 case WM_CTLCOLORLISTBOX:
208 case WM_CTLCOLORBTN:
209 case WM_CTLCOLORDLG:
210 case WM_CTLCOLORSTATIC:
211 case WM_CTLCOLORSCROLLBAR:
212 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
213 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
214 return GetSysColorBrush(COLOR_BTNFACE);
215
216 default:
217 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
218 }
219}
220//******************************************************************************
221//******************************************************************************
Note: See TracBrowser for help on using the repository browser.