Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

defwndproc.cpp

Go to the documentation of this file.
00001 /* $Id: defwndproc.cpp,v 1.16 2001/09/19 15:39:47 sandervl Exp $ */
00002 
00003 /*
00004  * Win32 default window API functions for OS/2
00005  *
00006  * Copyright 1998 Sander van Leeuwen
00007  *
00008  *
00009  * TODO: Incomplete default window handlers + incorrect handler (defframe)
00010  *
00011  * Project Odin Software License can be found in LICENSE.TXT
00012  *
00013  */
00014 #include "user32.h"
00015 #include "syscolor.h"
00016 #include "win32wbase.h"
00017 #include "win32dlg.h"
00018 
00019 #define DBG_LOCALLOG    DBG_defwndproc
00020 #include "dbglocal.h"
00021 
00022 #ifdef DEBUG
00023 char *GetMsgText(int Msg);
00024 #endif
00025 
00026 //******************************************************************************
00027 //******************************************************************************
00028 LRESULT WIN32API DefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
00029 {
00030   Win32BaseWindow *window;
00031   LRESULT result;
00032 
00033     dprintf2(("DefWindowProcA %x %x %x %x", hwnd, Msg, wParam, lParam));
00034     window = Win32BaseWindow::GetWindowFromHandle(hwnd);
00035     if(!window) {
00036         dprintf(("DefWindowProcA, window %x not found", hwnd));
00037         return 0;
00038     }
00039     result = window->DefWindowProcA(Msg, wParam, lParam);
00040     RELEASE_WNDOBJ(window);
00041     return result;
00042 }
00043 //******************************************************************************
00044 //******************************************************************************
00045 LRESULT WIN32API DefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
00046 {
00047   Win32BaseWindow *window;
00048   LRESULT result;
00049 
00050     dprintf2(("DefWindowProcW %x %x %x %x", hwnd, Msg, wParam, lParam));
00051     window = Win32BaseWindow::GetWindowFromHandle(hwnd);
00052     if(!window) {
00053         dprintf(("DefWindowProcW, window %x not found", hwnd));
00054         return 0;
00055     }
00056     result = window->DefWindowProcW(Msg, wParam, lParam);
00057     RELEASE_WNDOBJ(window);
00058     return result;
00059 }
00060 //******************************************************************************
00061 //******************************************************************************
00062 LRESULT WIN32API DefDlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
00063 {
00064   Win32Dialog *dialog;
00065   LRESULT result;
00066 
00067     dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
00068 //TODO: Wrong check?
00069 //    if(!dialog || !dialog->IsDialog()) {
00070     if(!dialog) {
00071         dprintf(("DefDlgProcA, window %x not found", hwnd));
00072         return 0;
00073     }
00074     if(dialog->IsDialog()) 
00075          result = dialog->DefDlgProcA(Msg, wParam, lParam);
00076     else result = dialog->DefWindowProcA(Msg, wParam, lParam);
00077     RELEASE_WNDOBJ(dialog);
00078     return result;
00079 }
00080 //******************************************************************************
00081 //******************************************************************************
00082 LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
00083 {
00084   Win32Dialog *dialog;
00085   LRESULT result;
00086 
00087     dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
00088 //TODO: Wrong check?
00089 //    if(!dialog || !dialog->IsDialog()) {
00090     if(!dialog) {
00091         dprintf(("DefDlgProcW, window %x not found", hwnd));
00092         return 0;
00093     }
00094     if(dialog->IsDialog()) 
00095          result = dialog->DefDlgProcW(Msg, wParam, lParam);
00096     else result = dialog->DefWindowProcW(Msg, wParam, lParam);
00097     RELEASE_WNDOBJ(dialog);
00098     return result;
00099 }
00100 //******************************************************************************
00101 //******************************************************************************

Generated on Wed Jan 23 23:17:29 2002 for ODIN-user32 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001