00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
00067
00068
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
00092
00093
00094
00095
00096
00097
00098
00099
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);
00109 }
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
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);
00130 }
00131
00132
00133
00134 BOOL MDICLIENT_Register()
00135 {
00136 WNDCLASSA wndClass;
00137
00138
00139
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