Changeset 741 for trunk/src/user32/new/defwndproc.cpp
- Timestamp:
- Aug 30, 1999, 2:00:12 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/defwndproc.cpp
r740 r741 1 /* $Id: defwndproc.cpp,v 1. 5 1999-08-29 20:05:07sandervl Exp $ */1 /* $Id: defwndproc.cpp,v 1.6 1999-08-30 11:59:53 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 #include "user32.h" 15 15 #include "syscolor.h" 16 #include "win32wbase.h" 16 17 #include "win32wnd.h" 17 18 … … 24 25 LRESULT WIN32API DefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 25 26 { 27 Win32BaseWindow *window; 28 29 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 30 if(!window) { 31 dprintf(("DefWindowProcA, window %x not found", hwnd)); 32 return 0; 33 } 34 return window->DefWindowProcA(Msg, wParam, lParam); 35 } 36 //****************************************************************************** 37 //****************************************************************************** 38 LRESULT WIN32API DefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 39 { 40 Win32BaseWindow *window; 41 42 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 43 if(!window) { 44 dprintf(("DefWindowProcW, window %x not found", hwnd)); 45 return 0; 46 } 47 return window->DefWindowProcW(Msg, wParam, lParam); 48 } 49 //****************************************************************************** 50 //****************************************************************************** 51 LRESULT WIN32API DefDlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 52 { 53 #ifdef DEBUG 54 //// WriteLog("*DDP*"); 55 #endif 56 switch(Msg) { 57 case WM_SETREDRAW: //Open32 does not set the visible flag 58 if(wParam) 59 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 60 else 61 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 62 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 63 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 64 return(TRUE); 65 case WM_CTLCOLORMSGBOX: 66 case WM_CTLCOLOREDIT: 67 case WM_CTLCOLORLISTBOX: 68 case WM_CTLCOLORBTN: 69 case WM_CTLCOLORDLG: 70 case WM_CTLCOLORSTATIC: 71 case WM_CTLCOLORSCROLLBAR: 72 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 73 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 74 return GetSysColorBrush(COLOR_BTNFACE); 75 76 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 77 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 78 return 0; 79 80 default: 81 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 82 } 83 } 84 //****************************************************************************** 85 //NOTE: Unicode msg translation! 86 //****************************************************************************** 87 LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 88 { 89 #ifdef DEBUG 90 //// WriteLog("*DDPW*"); 91 #endif 92 switch(Msg) { 93 case WM_SETREDRAW: //Open32 does not set the visible flag 94 if(wParam) 95 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 96 else 97 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 98 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 99 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 100 return(TRUE); 101 case WM_CTLCOLORMSGBOX: 102 case WM_CTLCOLOREDIT: 103 case WM_CTLCOLORLISTBOX: 104 case WM_CTLCOLORBTN: 105 case WM_CTLCOLORDLG: 106 case WM_CTLCOLORSTATIC: 107 case WM_CTLCOLORSCROLLBAR: 108 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 109 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 110 return GetSysColorBrush(COLOR_BTNFACE); 111 112 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 113 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 114 return 0; 115 116 default: 117 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 118 } 119 } 120 //****************************************************************************** 121 //****************************************************************************** 122 LRESULT WIN32API DefFrameProcA(HWND hwndFrame, HWND hwndMDIClient, UINT Msg, WPARAM wParam, LPARAM lParam) 123 { 26 124 Win32Window *window; 27 125 28 window = Win32Window::GetWindowFromHandle(hwnd);29 if(!window) { 30 dprintf(("Def WindowProcA, window %x not found", hwnd));31 return 0; 32 } 33 return window->Def WindowProcA(Msg, wParam, lParam);34 } 35 //****************************************************************************** 36 //****************************************************************************** 37 LRESULT WIN32API Def WindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)126 window = (Win32Window *)Win32BaseWindow::GetWindowFromHandle(hwndFrame); 127 if(!window) { 128 dprintf(("DefFrameProcA, window %x not found", hwndFrame)); 129 return 0; 130 } 131 return window->DefFrameProcA(hwndMDIClient, Msg, wParam, lParam); 132 } 133 //****************************************************************************** 134 //****************************************************************************** 135 LRESULT WIN32API DefFrameProcW(HWND hwndFrame, HWND hwndMDIClient, UINT Msg, WPARAM wParam, LPARAM lParam) 38 136 { 39 137 Win32Window *window; 40 138 41 window = Win32Window::GetWindowFromHandle(hwnd);42 if(!window) { 43 dprintf(("Def WindowProcW, window %x not found", hwnd));44 return 0; 45 } 46 return window->Def WindowProcW(Msg, wParam, lParam);47 } 48 //****************************************************************************** 49 //****************************************************************************** 50 LRESULT WIN32API Def DlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)51 { 52 #ifdef DEBUG 53 //// WriteLog("*D DP*");54 #endif 55 switch(Msg) { 56 case WM_SETREDRAW: //Open32 does not set the visible flag 57 if(wParam) 58 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 59 else 60 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 61 return O32_Def DlgProc(hwnd, Msg, wParam, lParam);62 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 63 return(TRUE); 64 case WM_CTLCOLORMSGBOX: 65 case WM_CTLCOLOREDIT: 66 case WM_CTLCOLORLISTBOX: 67 case WM_CTLCOLORBTN: 68 case WM_CTLCOLORDLG: 69 case WM_CTLCOLORSTATIC: 70 case WM_CTLCOLORSCROLLBAR: 71 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 72 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 73 return GetSysColorBrush(COLOR_BTNFACE); 74 75 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 76 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 77 return 0; 78 79 default: 80 return O32_Def DlgProc(hwnd, Msg, wParam, lParam);139 window = (Win32Window *)Win32BaseWindow::GetWindowFromHandle(hwndFrame); 140 if(!window) { 141 dprintf(("DefFrameProcW, window %x not found", hwndFrame)); 142 return 0; 143 } 144 return window->DefFrameProcW(hwndMDIClient, Msg, wParam, lParam); 145 } 146 //****************************************************************************** 147 //****************************************************************************** 148 LRESULT WIN32API DefMDIChildProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 149 { 150 #ifdef DEBUG 151 //// WriteLog("*DMP*"); 152 #endif 153 switch(Msg) { 154 case WM_SETREDRAW: //Open32 does not set the visible flag 155 if(wParam) 156 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 157 else 158 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 159 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 160 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 161 return(TRUE); 162 case WM_CTLCOLORMSGBOX: 163 case WM_CTLCOLOREDIT: 164 case WM_CTLCOLORLISTBOX: 165 case WM_CTLCOLORBTN: 166 case WM_CTLCOLORDLG: 167 case WM_CTLCOLORSTATIC: 168 case WM_CTLCOLORSCROLLBAR: 169 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 170 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 171 return GetSysColorBrush(COLOR_BTNFACE); 172 173 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 174 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 175 return 0; 176 177 default: 178 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 81 179 } 82 180 } … … 84 182 //NOTE: Unicode msg translation! 85 183 //****************************************************************************** 86 LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)87 {88 #ifdef DEBUG89 //// WriteLog("*DDPW*");90 #endif91 switch(Msg) {92 case WM_SETREDRAW: //Open32 does not set the visible flag93 if(wParam)94 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);95 else96 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);97 return O32_DefDlgProc(hwnd, Msg, wParam, lParam);98 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)99 return(TRUE);100 case WM_CTLCOLORMSGBOX:101 case WM_CTLCOLOREDIT:102 case WM_CTLCOLORLISTBOX:103 case WM_CTLCOLORBTN:104 case WM_CTLCOLORDLG:105 case WM_CTLCOLORSTATIC:106 case WM_CTLCOLORSCROLLBAR:107 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));108 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));109 return GetSysColorBrush(COLOR_BTNFACE);110 111 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!112 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));113 return 0;114 115 default:116 return O32_DefDlgProc(hwnd, Msg, wParam, lParam);117 }118 }119 //******************************************************************************120 //TODO: Should be handled differently than the normal wnd proc121 //******************************************************************************122 LRESULT WIN32API DefFrameProcA(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam)123 {124 Win32Window *window;125 126 window = Win32Window::GetWindowFromHandle(hwndFrame);127 if(!window) {128 dprintf(("DefFrameProcA, window %x not found", hwndFrame));129 return 0;130 }131 return window->DefWindowProcA(Msg, wParam, lParam);132 }133 //******************************************************************************134 //TODO: Should be handled differently than the normal wnd proc135 //******************************************************************************136 LRESULT WIN32API DefFrameProcW(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam)137 {138 Win32Window *window;139 140 window = Win32Window::GetWindowFromHandle(hwndFrame);141 if(!window) {142 dprintf(("DefFrameProcW, window %x not found", hwndFrame));143 return 0;144 }145 return window->DefWindowProcW(Msg, wParam, lParam);146 }147 //******************************************************************************148 //******************************************************************************149 LRESULT WIN32API DefMDIChildProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)150 {151 #ifdef DEBUG152 //// WriteLog("*DMP*");153 #endif154 switch(Msg) {155 case WM_SETREDRAW: //Open32 does not set the visible flag156 if(wParam)157 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);158 else159 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);160 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);161 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)162 return(TRUE);163 case WM_CTLCOLORMSGBOX:164 case WM_CTLCOLOREDIT:165 case WM_CTLCOLORLISTBOX:166 case WM_CTLCOLORBTN:167 case WM_CTLCOLORDLG:168 case WM_CTLCOLORSTATIC:169 case WM_CTLCOLORSCROLLBAR:170 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));171 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));172 return GetSysColorBrush(COLOR_BTNFACE);173 174 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!175 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));176 return 0;177 178 default:179 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);180 }181 }182 //******************************************************************************183 //NOTE: Unicode msg translation!184 //******************************************************************************185 184 LRESULT WIN32API DefMDIChildProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 186 185 {
Note:
See TracChangeset
for help on using the changeset viewer.