00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __WIN32WNDBASE_H__
00014 #define __WIN32WNDBASE_H__
00015
00016 #ifdef __cplusplus
00017
00018 #include <win32class.h>
00019 #include "open32wbase.h"
00020 #include <gen_object.h>
00021 #include <win32wndchild.h>
00022 #include <winuser32.h>
00023 #include <winres.h>
00024 #include <scroll.h>
00025
00026 class Win32BaseWindow;
00027
00028 #define OFFSET_RESERVED 0 //reserved for odin apps (such as Opera)
00029 #define OFFSET_WIN32WNDPTR 4
00030 #define OFFSET_WIN32PM_MAGIC 8
00031 #define OFFSET_WIN32FLAGS 12
00032 #define NROF_WIN32WNDBYTES 16
00033
00034 #define WINDOWFLAG_ACTIVE 1
00035
00036 #define WIN32PM_MAGIC 0x12345678
00037 #define CheckMagicDword(a) (a==WIN32PM_MAGIC)
00038
00039 #define TYPE_ASCII 0
00040 #define TYPE_UNICODE 1
00041
00042 #define GW_HWNDNEXTCHILD (0x10000 | GW_HWNDNEXT)
00043 #define GW_HWNDPREVCHILD (0x10000 | GW_HWNDPREV)
00044 #define GW_HWNDFIRSTCHILD (0x10000 | GW_CHILD)
00045 #define GW_HWNDLASTCHILD (0x10000 | GW_HWNDLAST)
00046
00047 #ifdef DEBUG
00048 #define RELEASE_WNDOBJ(a) { a->release(__FUNCTION__, __LINE__); a = NULL; }
00049 #else
00050 #define RELEASE_WNDOBJ(a) { a->release(); a = NULL; }
00051 #endif
00052
00053 typedef struct {
00054 USHORT cb;
00055 Win32BaseWindow *win32wnd;
00056 ULONG win32CreateStruct;
00057 } CUSTOMWNDDATA;
00058
00059 typedef struct tagPROPERTY
00060 {
00061 struct tagPROPERTY *next;
00062 HANDLE handle;
00063 LPSTR string;
00064 } PROPERTY;
00065
00066
00067
00068 #define OPEN32_MSGDIFF 0xC00
00069 #define WIN32APP_POSTMSG (0x1000+OPEN32_MSGDIFF)
00070
00071
00072
00073
00074 #define WIN32APP_SETFOCUSMSG (WIN32APP_POSTMSG-1)
00075
00076 #define WIN32MSG_MAGICA 0x12345678
00077 #define WIN32MSG_MAGICW 0x12345679
00078
00079 typedef struct
00080 {
00081 ULONG wParam;
00082 ULONG lParam;
00083 } POSTMSG_PACKET;
00084
00085 #define BROADCAST_SEND 0
00086 #define BROADCAST_POST 1
00087
00088 #define HAS_DLGFRAME(style,exStyle) \
00089 (((exStyle) & WS_EX_DLGMODALFRAME) || \
00090 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
00091
00092 #define HAS_THICKFRAME(style,exStyle) \
00093 (((style) & WS_THICKFRAME) && \
00094 !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
00095 #if 0
00096 (((style) & WS_THICKFRAME) && \
00097 !((exStyle) & WS_EX_DLGMODALFRAME) && \
00098 !((style) & WS_CHILD))
00099 #endif
00100
00101 #define HAS_THINFRAME(style) \
00102 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
00103
00104 #define HAS_BIGFRAME(style,exStyle) \
00105 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
00106 ((exStyle) & WS_EX_DLGMODALFRAME))
00107
00108 #define HAS_ANYFRAME(style,exStyle) \
00109 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
00110 ((exStyle) & WS_EX_DLGMODALFRAME) || \
00111 !((style) & (WS_CHILD | WS_POPUP)))
00112
00113 #define HAS_3DFRAME(exStyle) \
00114 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))
00115
00116 #define HAS_BORDER(style, exStyle) \
00117 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))
00118
00119 #define IS_OVERLAPPED(style) \
00120 !(style & (WS_CHILD | WS_POPUP))
00121
00122 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (getWindowId() != 0))
00123
00124 #define STATE_INIT 0 //initial state
00125 #define STATE_PRE_WMNCCREATE 1 //before WM_NCCREATE
00126 #define STATE_POST_WMNCCREATE 2 //after WM_NCCREATE
00127 #define STATE_PRE_WMCREATE 3 //before WM_CREATE
00128 #define STATE_POST_WMCREATE 4 //after WM_CREATE
00129 #define STATE_CREATED 5 //after successful return of WinCreateWindow
00130 #define STATE_DESTROYED 6 //DestroyWindow called for window
00131
00132
00133 class Win32BaseWindow : public GenericObject, public ChildWindow
00134 {
00135 public:
00136 Win32BaseWindow();
00137 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
00138 Win32BaseWindow(HWND hwndOS2, ATOM classAtom);
00139
00140 virtual ~Win32BaseWindow();
00141
00142 virtual ULONG MsgCreate(HWND hwndOS2);
00143 ULONG MsgQuit();
00144 ULONG MsgClose();
00145 ULONG MsgDestroy();
00146 virtual ULONG MsgEnable(BOOL fEnable);
00147 ULONG MsgShow(BOOL fShow);
00148 ULONG MsgPosChanging(LPARAM lp);
00149 ULONG MsgPosChanged(LPARAM lp);
00150 ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd, HWND hwndOS2Win);
00151 ULONG MsgChildActivate(BOOL fActivate);
00152 ULONG MsgSetFocus(HWND hwnd);
00153 ULONG MsgKillFocus(HWND hwnd);
00154 ULONG MsgScroll(ULONG msg, ULONG scrollCode, ULONG scrollPos);
00155 ULONG MsgButton(MSG *msg);
00156 ULONG MsgMouseMove(MSG *msg);
00157 ULONG MsgChar(MSG *msg);
00158 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE);
00159 ULONG MsgEraseBackGround(HDC hdc);
00160 ULONG MsgNCPaint(PRECT pUpdateRect);
00161 ULONG MsgFormatFrame(WINDOWPOS *lpWndPos);
00162 ULONG DispatchMsgA(MSG *msg);
00163 ULONG DispatchMsgW(MSG *msg);
00164
00165 ULONG MsgSetText(LPSTR lpsz, LONG cch);
00166 ULONG MsgGetTextLength();
00167 void MsgGetText(char *wndtext, ULONG textlength);
00168
00169 virtual LONG SetWindowLong(int index, ULONG value, BOOL fUnicode);
00170 virtual ULONG GetWindowLong(int index, BOOL fUnicode);
00171 virtual WORD SetWindowWord(int index, WORD value);
00172 virtual WORD GetWindowWord(int index);
00173
00174 DWORD getStyle() { return dwStyle; };
00175 DWORD getOldStyle() { return dwOldStyle; };
00176 void setStyle(DWORD newstyle) { dwStyle = newstyle; };
00177 void setOldStyle(DWORD oldStyle) { dwOldStyle = oldStyle; };
00178 DWORD getExStyle() { return dwExStyle; };
00179 void setExStyle(DWORD newexstyle) { dwExStyle = newexstyle; };
00180 ULONG getInstance() { return hInstance; };
00181 void setInstance(ULONG newinstance) { hInstance = newinstance; };
00182 HWND getWindowHandle() { return Win32Hwnd; };
00183 HWND getOS2WindowHandle() { return OS2Hwnd; };
00184 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; };
00185 HWND getLastActive() { return hwndLastActive; };
00186 void setLastActive(HWND _hwndLastActive)
00187 { hwndLastActive = _hwndLastActive; };
00188
00189 Win32WndClass *getWindowClass() { return windowClass; };
00190
00191 LONG getLastHitTestVal() { return lastHitTestVal; }
00192
00193 DWORD getWindowContextHelpId() { return contextHelpId; };
00194 void setWindowContextHelpId(DWORD id){ contextHelpId = id; };
00195
00196 BOOL isFrameWindow();
00197 virtual BOOL isMDIClient();
00198 virtual BOOL isMDIChild();
00199 virtual BOOL isDesktopWindow();
00200
00201 BOOL fHasParentDC() { return fParentDC; };
00202
00203 Win32BaseWindow *getParent();
00204 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
00205 WNDPROC getWindowProc() { return win32wndproc; };
00206 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
00207 DWORD getWindowId() { return dwIDMenu; };
00208 void setWindowId(DWORD id) { dwIDMenu = id; };
00209 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
00210 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
00211 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
00212 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
00213 BOOL isChild();
00214 PRECT getClientRectPtr() { return &rectClient; };
00215 void getClientRect(PRECT rect)
00216 {
00217 *rect = rectClient;
00218 rect->right -= rect->left;
00219 rect->bottom -= rect->top;
00220 rect->left = rect->top = 0;
00221 }
00222 void setClientRect(PRECT rect) { rectClient = *rect; };
00223 PRECT getWindowRect() { return &rectWindow; };
00224 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
00225 {
00226 rectClient.left = left; rectClient.top = top;
00227 rectClient.right = right; rectClient.bottom = bottom;
00228 };
00229 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
00230 {
00231 rectWindow.left = left; rectWindow.top = top;
00232 rectWindow.right = right; rectWindow.bottom = bottom;
00233 };
00234 void setWindowRect(PRECT rect) { rectWindow = *rect; };
00235 DWORD getFlags() { return flags; };
00236 void setFlags(DWORD newflags) { flags = newflags; };
00237
00238 DWORD getCBExtra() { return cbExtra; };
00239 PVOID getExtraPtr() { return pExtra; };
00240
00241 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
00242 HMENU GetSysMenu() { return hSysMenu; }
00243
00244 HICON IconForWindow(WPARAM fType);
00245
00246 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
00247 HRGN GetWindowRegion() { return hWindowRegion; };
00248
00249
00250 HRGN GetClipRegion() { return hClipRegion; };
00251 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
00252
00253 BOOL ShowWindow(ULONG nCmdShow);
00254 BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags);
00255 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
00256 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
00257 BOOL ScrollWindow(int dx, int dy);
00258 virtual BOOL DestroyWindow();
00259 HWND SetActiveWindow();
00260 BOOL DeactivateChildWindow();
00261 HWND GetParent();
00262 HWND SetParent(HWND hwndNewParent);
00263
00264 BOOL IsChild(HWND hwndParent);
00265
00266 HWND GetTopWindow();
00267 HWND GetTopParent();
00268
00269 HWND GetWindow(UINT uCmd);
00270 virtual BOOL EnableWindow(BOOL fEnable);
00271 BOOL CloseWindow();
00272 static HWND GetActiveWindow();
00273
00274 BOOL IsWindow() { return TRUE; };
00275 BOOL IsDialog() { return fIsDialog; };
00276 BOOL IsModalDialog() { return fIsModalDialog; };
00277 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
00278 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
00279 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
00280 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
00281 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
00282 BOOL IsParentChanging() { return fParentChange; };
00283 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
00284 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
00285 BOOL IsWindowIconic();
00286
00287 BOOL IsWindowUnicode();
00288 BOOL IsMixMaxStateChanging() { return fMinMaxChange; };
00289
00290 void SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
00291 BOOL IsVisibleRegionChanged() { return fVisibleRegionChanged; };
00292 BOOL setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData)
00293 {
00294 lpVisRgnNotifyProc = lpNotifyProc;
00295 dwVisRgnNotifyParam = dwUserData;
00296 return TRUE;
00297 }
00298 void callVisibleRgnNotifyProc(BOOL fDrawingAllowed)
00299 {
00300 if(lpVisRgnNotifyProc) {
00301 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam);
00302 }
00303 }
00304 int GetWindowTextLength(BOOL fUnicode);
00305 int GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
00306 int GetWindowTextLengthW() { return GetWindowTextLength(TRUE); };
00307
00308 int GetWindowTextA(LPSTR lpsz, int cch);
00309 int GetWindowTextW(LPWSTR lpsz, int cch);
00310 BOOL SetWindowTextA(LPSTR lpsz);
00311 BOOL SetWindowTextW(LPWSTR lpsz);
00312 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
00313 CHAR *getWindowNamePtrA();
00314 WCHAR *getWindowNamePtrW();
00315 VOID freeWindowNamePtr(PVOID namePtr);
00316 CHAR *getWindowNameA() { return windowNameA; };
00317 WCHAR *getWindowNameW() { return windowNameW; };
00318 int getWindowNameLength() { return windowNameLength; };
00319 Win32WndClass *getClass() { return windowClass; };
00320 Win32BaseWindow *getOwner() { return owner; };
00321 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
00322
00323 SCROLLBAR_INFO *getScrollInfo(int nBar);
00324
00325 LRESULT SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
00326 LRESULT SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
00327 static LRESULT BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam);
00328 static LRESULT BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
00329 void CallWindowHookProc(ULONG hooktype, ULONG Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode = FALSE);
00330
00331 LRESULT DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
00332 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
00333
00334 LRESULT DefWndControlColor(UINT ctlType, HDC hdc);
00335 LRESULT DefWndPrint(HDC hdc,ULONG uFlags);
00336
00337 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
00338
00339 HWND FindWindowById(int id);
00340
00341 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow);
00342
00343 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
00344 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
00345 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
00346
00347
00348 BOOL isComingToTop() { return fComingToTop; };
00349 void setComingToTop(BOOL fTop) { fComingToTop = fTop; };
00350 BOOL isInTasklist() { return fTaskList; };
00351
00352
00353 HANDLE getProp(LPCSTR str);
00354 BOOL setProp(LPCSTR str, HANDLE handle);
00355 HANDLE removeProp(LPCSTR str);
00356 INT enumPropsExA(PROPENUMPROCEXA func, LPARAM lParam);
00357 INT enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
00358
00359 #ifdef DEBUG
00360 LONG addRef();
00361 LONG release(char *function = __FUNCTION__, int line = __LINE__ );
00362 #endif
00363
00364
00365
00366 static Win32BaseWindow *GetWindowFromHandle(HWND hwnd);
00367 static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd);
00368 static Win32BaseWindow *GetWindowFromOS2FrameHandle(HWND hwnd);
00369
00370 static void DestroyAll();
00371
00372 protected:
00373 #ifndef OS2_INCLUDED
00374 BOOL CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
00375 #endif
00376 LRESULT SendInternalMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
00377 LRESULT SendInternalMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
00378 void Init();
00379
00380 void NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
00381
00382
00383 void removeWindowProps();
00384 PROPERTY *findWindowProperty(LPCSTR str);
00385
00386 HWND OS2Hwnd, OS2HwndFrame;
00387 HMENU hSysMenu;
00388 HWND Win32Hwnd;
00389
00390 int posx, posy, width, height;
00391
00392
00393 ULONG dwExStyle;
00394 ULONG dwStyle;
00395 ULONG dwOldStyle;
00396 WNDPROC win32wndproc;
00397 ULONG hInstance;
00398
00399
00400 ULONG dwIDMenu; //GWL_ID
00401 ULONG userData;
00402 HWND hwndLastActive;
00403
00404 ULONG cbExtra;
00405 PVOID pExtra;
00406
00407 HWND hwndLinkAfter;
00408 DWORD flags;
00409 DWORD contextHelpId;
00410 DWORD hotkey;
00411 LONG lastHitTestVal;
00412
00413 HWND OS2HwndModalDialog;
00414
00415 ULONG fFirstShow:1,
00416 fIsDialog:1,
00417 fIsModalDialog:1,
00418 fIsModalDialogOwner:1,
00419 fInternalMsg:1,
00420
00421 fParentChange:1,
00422 fDestroyWindowCalled:1,
00423 fTaskList:1,
00424 fXDefault:1,
00425 fCXDefault:1,
00426 fParentDC:1,
00427 fComingToTop:1,
00428 isUnicode:1,
00429 fMinMaxChange:1,
00430 fVisibleRegionChanged:1,
00431 fEraseBkgndFlag:1,
00432 fFakeWindow:1;
00433
00434 ULONG state;
00435 HRGN hWindowRegion;
00436 HRGN hClipRegion;
00437
00438 DWORD dwThreadId;
00439 DWORD dwProcessId;
00440
00441 Win32BaseWindow *owner;
00442 HICON hIcon,hIconSm;
00443
00444 char *windowNameA;
00445 WCHAR *windowNameW;
00446 int windowNameLength;
00447
00448 char *userWindowBytes;
00449 ULONG nrUserWindowBytes;
00450
00451 RECT rectWindow;
00452 RECT rectClient;
00453 WINDOWPLACEMENT windowpos;
00454
00455 PROPERTY *propertyList;
00456
00457 VISRGN_NOTIFY_PROC lpVisRgnNotifyProc;
00458 DWORD dwVisRgnNotifyParam;
00459
00460 HANDLE hTaskList;
00461
00462 CREATESTRUCTA *tmpcs;
00463 ULONG sw;
00464
00465 SCROLLBAR_INFO *vertScrollInfo;
00466 SCROLLBAR_INFO *horzScrollInfo;
00467
00468 Win32WndClass *windowClass;
00469
00470 static GenericObject *windows;
00471 static CRITICAL_SECTION critsect;
00472
00473 private:
00474 #ifndef OS2_INCLUDED
00475 void GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
00476 UINT MinMaximize(UINT cmd, LPRECT lpRect);
00477 LONG HandleWindowPosChanging(WINDOWPOS *winpos);
00478 LONG HandleNCActivate(WPARAM wParam);
00479 VOID TrackMinMaxHelpBox(WORD wParam);
00480 VOID TrackCloseButton(WORD wParam);
00481 VOID TrackScrollBar(WPARAM wParam,POINT pt);
00482 LONG HandleNCLButtonDown(WPARAM wParam,LPARAM lParam);
00483 LONG HandleNCLButtonDblClk(WPARAM wParam,LPARAM lParam);
00484 LONG HandleNCRButtonUp(WPARAM wParam,LPARAM lParam);
00485 VOID AdjustRectOuter(LPRECT rect,BOOL menu);
00486 VOID AdjustRectInner(LPRECT rect);
00487 LONG HandleNCCalcSize(BOOL calcValidRects,RECT *winRect);
00488 VOID DrawFrame(HDC hdc,RECT *rect,BOOL dlgFrame,BOOL active);
00489 public:
00490 VOID GetInsideRect(RECT *rect);
00491 LONG HandleNCHitTest(POINT pt);
00492 BOOL GetSysPopupPos(RECT* rect);
00493 private:
00494 BOOL DrawSysButton(HDC hdc,RECT *rect);
00495 BOOL DrawGrayButton(HDC hdc,int x,int y);
00496 VOID DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
00497 VOID DrawMaxButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
00498 VOID DrawMinButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
00499 VOID DrawContextHelpButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
00500 VOID DrawCaption(HDC hdc,RECT *rect,BOOL active);
00501 VOID DoNCPaint(HRGN clip,BOOL suppress_menupaint);
00502 LONG HandleNCPaint(HRGN clip);
00503 LONG HandleSysCommand(WPARAM wParam, POINT *pt32);
00504
00505 LONG SendNCCalcSize(BOOL calcValidRect,
00506 RECT *newWindowRect, RECT *oldWindowRect,
00507 RECT *oldClientRect, WINDOWPOS *winpos,
00508 RECT *newClientRect );
00509
00510 #else
00511 friend BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs);
00512 #endif
00513
00514 public:
00515 void SetFakeOpen32() { WinSetDAXData (OS2Hwnd, &fakeWinBase); }
00516 void RemoveFakeOpen32() { WinSetDAXData (OS2Hwnd, NULL); }
00517
00518 fakeOpen32WinBaseClass fakeWinBase;
00519
00520 VOID AdjustMaximizedRect(LPRECT rect);
00521 VOID AdjustTrackInfo(PPOINT minTrackSize,PPOINT maxTrackSize);
00522
00523
00524 #ifndef OS2_INCLUDED
00525 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC|CS_CLASSDC)); }
00526 #else
00527 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC_W|CS_CLASSDC_W)); }
00528 #endif
00529
00530 HDC getOwnDC() { return ownDC; }
00531 void setOwnDC(HDC hdc) { ownDC = hdc; }
00532 protected:
00533 HDC ownDC;
00534
00535 public:
00536 VOID setEraseBkgnd (BOOL erase) { fEraseBkgndFlag = erase; }
00537 BOOL needsEraseBkgnd() { return fEraseBkgndFlag; }
00538 };
00539
00540 #endif //__cplusplus
00541
00542 #endif //__WIN32WNDBASE_H__