[9523] | 1 | /* $Id: win32wmdiclient.cpp,v 1.41 2002-12-18 12:28:08 sandervl Exp $ */
|
---|
[2469] | 2 | /*
|
---|
| 3 | * Win32 MDI Client Window Class for OS/2
|
---|
| 4 | *
|
---|
| 5 | * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
| 6 | * Copyright 1999 Daniela Engert (dani@ngrt.de)
|
---|
| 7 | *
|
---|
[6762] | 8 | * Parts based on Wine (windows\mdi.c)
|
---|
[2469] | 9 | *
|
---|
| 10 | * Copyright 1994, Bob Amstadt
|
---|
| 11 | * 1995,1996 Alex Korobka
|
---|
| 12 | *
|
---|
| 13 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 14 | *
|
---|
| 15 | */
|
---|
| 16 | #include <os2win.h>
|
---|
| 17 | #include <win.h>
|
---|
| 18 | #include <stdlib.h>
|
---|
| 19 | #include <math.h>
|
---|
| 20 | #include <string.h>
|
---|
| 21 | #include <stdarg.h>
|
---|
| 22 | #include <assert.h>
|
---|
| 23 | #include <misc.h>
|
---|
| 24 | #include <heapstring.h>
|
---|
[21916] | 25 | #include "win32wnd.h"
|
---|
| 26 | #include "win32wmdiclient.h"
|
---|
[2469] | 27 | #include <spy.h>
|
---|
| 28 | #include "wndmsg.h"
|
---|
[21916] | 29 | #include "oslibwin.h"
|
---|
| 30 | #include "oslibutil.h"
|
---|
| 31 | #include "oslibgdi.h"
|
---|
| 32 | #include "oslibres.h"
|
---|
[2469] | 33 | #include "oslibdos.h"
|
---|
| 34 | #include "syscolor.h"
|
---|
| 35 | #include "win32wndhandle.h"
|
---|
| 36 |
|
---|
[2852] | 37 | #define DBG_LOCALLOG DBG_win32wmdiclient
|
---|
[2803] | 38 | #include "dbglocal.h"
|
---|
[2469] | 39 |
|
---|
[2803] | 40 |
|
---|
[2469] | 41 | //******************************************************************************
|
---|
| 42 | //******************************************************************************
|
---|
| 43 | Win32MDIClientWindow::Win32MDIClientWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode)
|
---|
[6762] | 44 | : Win32BaseWindow()
|
---|
[2469] | 45 | {
|
---|
| 46 | Init();
|
---|
| 47 | this->isUnicode = isUnicode;
|
---|
[6762] | 48 | memset(&mdiClientInfo, 0, sizeof(mdiClientInfo));
|
---|
| 49 | cbExtra = sizeof(mdiClientInfo);
|
---|
| 50 | pExtra = (PVOID)&mdiClientInfo;
|
---|
[2469] | 51 | CreateWindowExA(lpCreateStructA, classAtom);
|
---|
| 52 | }
|
---|
| 53 | //******************************************************************************
|
---|
| 54 | //******************************************************************************
|
---|
| 55 | Win32MDIClientWindow::~Win32MDIClientWindow()
|
---|
| 56 | {
|
---|
| 57 | }
|
---|
| 58 | //******************************************************************************
|
---|
| 59 | //******************************************************************************
|
---|
| 60 | BOOL Win32MDIClientWindow::isMDIClient()
|
---|
| 61 | {
|
---|
| 62 | return TRUE;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
[6762] | 65 | /*************************************************************************
|
---|
| 66 | * SCROLL_SetNCSbState
|
---|
[2469] | 67 | *
|
---|
[6762] | 68 | * Updates both scrollbars at the same time. Used by MDI CalcChildScroll().
|
---|
[2469] | 69 | */
|
---|
[6762] | 70 | INT SCROLL_SetNCSbState(HWND hwnd, int vMin, int vMax, int vPos,
|
---|
| 71 | int hMin, int hMax, int hPos)
|
---|
[2469] | 72 | {
|
---|
[6762] | 73 | SCROLLINFO vInfo, hInfo;
|
---|
[2469] | 74 |
|
---|
[6762] | 75 | vInfo.cbSize = hInfo.cbSize = sizeof(SCROLLINFO);
|
---|
| 76 | vInfo.nMin = vMin;
|
---|
| 77 | vInfo.nMax = vMax;
|
---|
| 78 | vInfo.nPos = vPos;
|
---|
| 79 | hInfo.nMin = hMin;
|
---|
| 80 | hInfo.nMax = hMax;
|
---|
| 81 | hInfo.nPos = hPos;
|
---|
| 82 | vInfo.fMask = hInfo.fMask = SIF_RANGE | SIF_POS;
|
---|
[2469] | 83 |
|
---|
[6762] | 84 | SetScrollInfo(hwnd,SB_VERT,&vInfo,TRUE);
|
---|
| 85 | SetScrollInfo(hwnd,SB_HORZ,&hInfo,TRUE);
|
---|
[2469] | 86 | return 0;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | /*****************************************************************************
|
---|
| 91 | * Name : BOOL WIN32API CascadeChildWindows
|
---|
| 92 | * Purpose : Unknown
|
---|
| 93 | * Parameters: Unknown
|
---|
| 94 | * Variables :
|
---|
| 95 | * Result :
|
---|
| 96 | * Remark :
|
---|
| 97 | * Status : UNTESTED UNKNOWN STUB
|
---|
| 98 | *
|
---|
| 99 | * Author : Patrick Haller [Wed, 1998/06/16 11:55]
|
---|
| 100 | *****************************************************************************/
|
---|
[7866] | 101 | BOOL WIN32API CascadeChildWindows(HWND x1, DWORD x2)
|
---|
[2469] | 102 | {
|
---|
| 103 | dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
|
---|
| 104 | x1,
|
---|
| 105 | x2));
|
---|
| 106 |
|
---|
| 107 | return (FALSE); /* default */
|
---|
| 108 | }
|
---|
| 109 |
|
---|
| 110 | /*****************************************************************************
|
---|
| 111 | * Name : BOOL WIN32API TileChildWindows
|
---|
| 112 | * Purpose : Unknown
|
---|
| 113 | * Parameters: Unknown
|
---|
| 114 | * Variables :
|
---|
| 115 | * Result :
|
---|
| 116 | * Remark :
|
---|
| 117 | * Status : UNTESTED UNKNOWN STUB
|
---|
| 118 | *
|
---|
| 119 | * Author : Patrick Haller [Wed, 1998/06/16 11:55]
|
---|
| 120 | *****************************************************************************/
|
---|
[7866] | 121 | BOOL WIN32API TileChildWindows(HWND x1, DWORD x2)
|
---|
[2469] | 122 | {
|
---|
| 123 | dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
|
---|
| 124 | x1,
|
---|
| 125 | x2));
|
---|
| 126 |
|
---|
| 127 | return (FALSE); /* default */
|
---|
| 128 | }
|
---|
| 129 | //******************************************************************************
|
---|
| 130 | //******************************************************************************
|
---|