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

win32wmdiclient.cpp

Go to the documentation of this file.
00001 /* $Id: win32wmdiclient.cpp,v 1.39 2001/09/19 15:39:51 sandervl Exp $ */
00002 /*
00003  * Win32 MDI Client Window Class for OS/2
00004  *
00005  * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
00006  * Copyright 1999      Daniela Engert (dani@ngrt.de)
00007  *
00008  * Parts based on Wine (windows\mdi.c)
00009  *
00010  * Copyright 1994, Bob Amstadt
00011  *           1995,1996 Alex Korobka
00012  *
00013  * Project Odin Software License can be found in LICENSE.TXT
00014  *
00015  */
00016 #include <os2win.h>
00017 #include <win.h>
00018 #include <stdlib.h>
00019 #include <math.h>
00020 #include <string.h>
00021 #include <stdarg.h>
00022 #include <assert.h>
00023 #include <misc.h>
00024 #include <heapstring.h>
00025 #include <win32wnd.h>
00026 #include <win32wmdiclient.h>
00027 #include <spy.h>
00028 #include "wndmsg.h"
00029 #include <oslibwin.h>
00030 #include <oslibutil.h>
00031 #include <oslibgdi.h>
00032 #include <oslibres.h>
00033 #include "oslibdos.h"
00034 #include "syscolor.h"
00035 #include "win32wndhandle.h"
00036 
00037 #define DBG_LOCALLOG    DBG_win32wmdiclient
00038 #include "dbglocal.h"
00039 
00040 
00041 //******************************************************************************
00042 //******************************************************************************
00043 Win32MDIClientWindow::Win32MDIClientWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode)
00044                 : Win32BaseWindow()
00045 {
00046   Init();
00047   this->isUnicode = isUnicode;
00048   memset(&mdiClientInfo, 0, sizeof(mdiClientInfo));
00049   cbExtra = sizeof(mdiClientInfo);
00050   pExtra  = (PVOID)&mdiClientInfo;
00051   CreateWindowExA(lpCreateStructA, classAtom);
00052 }
00053 //******************************************************************************
00054 //******************************************************************************
00055 Win32MDIClientWindow::~Win32MDIClientWindow()
00056 {
00057 }
00058 //******************************************************************************
00059 //******************************************************************************
00060 BOOL Win32MDIClientWindow::isMDIClient()
00061 {
00062     return TRUE;
00063 }
00064 
00065 /*************************************************************************
00066  *           SCROLL_SetNCSbState
00067  *
00068  * Updates both scrollbars at the same time. Used by MDI CalcChildScroll().
00069  */
00070 INT SCROLL_SetNCSbState(HWND hwnd, int vMin, int vMax, int vPos,
00071                         int hMin, int hMax, int hPos)
00072 {
00073     SCROLLINFO vInfo, hInfo;
00074 
00075     vInfo.cbSize = hInfo.cbSize = sizeof(SCROLLINFO);
00076     vInfo.nMin   = vMin;
00077     vInfo.nMax   = vMax;
00078     vInfo.nPos   = vPos;
00079     hInfo.nMin   = hMin;
00080     hInfo.nMax   = hMax;
00081     hInfo.nPos   = hPos;
00082     vInfo.fMask  = hInfo.fMask = SIF_RANGE | SIF_POS;
00083 
00084     SetScrollInfo(hwnd,SB_VERT,&vInfo,TRUE);
00085     SetScrollInfo(hwnd,SB_HORZ,&hInfo,TRUE);
00086     return 0;
00087 }
00088 
00089 
00090 /*****************************************************************************
00091  * Name      : BOOL WIN32API CascadeChildWindows
00092  * Purpose   : Unknown
00093  * Parameters: Unknown
00094  * Variables :
00095  * Result    :
00096  * Remark    :
00097  * Status    : UNTESTED UNKNOWN STUB
00098  *
00099  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
00100  *****************************************************************************/
00101 BOOL WIN32API CascadeChildWindows(DWORD x1,
00102                                      DWORD x2)
00103 {
00104   dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
00105            x1,
00106            x2));
00107 
00108   return (FALSE); /* default */
00109 }
00110 
00111 /*****************************************************************************
00112  * Name      : BOOL WIN32API TileChildWindows
00113  * Purpose   : Unknown
00114  * Parameters: Unknown
00115  * Variables :
00116  * Result    :
00117  * Remark    :
00118  * Status    : UNTESTED UNKNOWN STUB
00119  *
00120  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
00121  *****************************************************************************/
00122 BOOL WIN32API TileChildWindows(DWORD x1,
00123                                   DWORD x2)
00124 {
00125   dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
00126            x1,
00127            x2));
00128 
00129   return (FALSE); /* default */
00130 }
00131 
00132 //******************************************************************************
00133 //******************************************************************************
00134 BOOL MDICLIENT_Register()
00135 {
00136     WNDCLASSA wndClass;
00137 
00138 //SvL: Don't check this now
00139 //    if (GlobalFindAtomA(MDICLIENTCLASSNAMEA)) return FALSE;
00140 
00141     ZeroMemory(&wndClass,sizeof(WNDCLASSA));
00142     wndClass.style         = CS_GLOBALCLASS;
00143     wndClass.lpfnWndProc   = (WNDPROC)MDIClientWndProcA;
00144     wndClass.cbClsExtra    = 0;
00145     wndClass.cbWndExtra    = 0;
00146     wndClass.hCursor       = LoadCursorA(0,IDC_ARROWA);;
00147     wndClass.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
00148     wndClass.lpszClassName = MDICLIENTCLASSNAMEA;
00149 
00150     return RegisterClassA(&wndClass);
00151 }
00152 //******************************************************************************
00153 //******************************************************************************
00154 BOOL MDICLIENT_Unregister()
00155 {
00156     if (GlobalFindAtomA(MDICLIENTCLASSNAMEA))
00157             return UnregisterClassA(MDICLIENTCLASSNAMEA,(HINSTANCE)NULL);
00158     else    return FALSE;
00159 }
00160 //******************************************************************************
00161 //******************************************************************************

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