source: trunk/src/user32/win32wbase.h@ 10060

Last change on this file since 10060 was 10060, checked in by sandervl, 22 years ago

Keep track of all open DCs and query the visible region during WM_VRNENABLED to work around a PM bug

File size: 21.3 KB
Line 
1/* $Id: win32wbase.h,v 1.153 2003-05-02 15:33:17 sandervl Exp $ */
2/*
3 * Win32 Window Base Class for OS/2
4 *
5 *
6 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1999 Daniela Engert (dani@ngrt.de)
8 *
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13#ifndef __WIN32WNDBASE_H__
14#define __WIN32WNDBASE_H__
15
16#ifdef __cplusplus
17
18#include <win32class.h>
19#include <gen_object.h>
20#include <win32wndchild.h>
21#include <winuser32.h>
22#include <winres.h>
23#include <scroll.h>
24
25class Win32BaseWindow;
26
27#define OFFSET_RESERVED 0 //reserved for odin apps (such as Opera)
28#define OFFSET_WIN32WNDPTR 4
29#define OFFSET_WIN32PM_MAGIC 8
30#define OFFSET_WIN32FLAGS 12
31#define NROF_WIN32WNDBYTES 16
32
33#define WINDOWFLAG_ACTIVE 1
34
35#define WIN32PM_MAGIC 0x12345678
36#define CheckMagicDword(a) (a==WIN32PM_MAGIC)
37
38#define MAX_OPENDCS 8
39
40#define TYPE_ASCII 0
41#define TYPE_UNICODE 1
42
43#define GW_HWNDNEXTCHILD (0x10000 | GW_HWNDNEXT)
44#define GW_HWNDPREVCHILD (0x10000 | GW_HWNDPREV)
45#define GW_HWNDFIRSTCHILD (0x10000 | GW_CHILD)
46#define GW_HWNDLASTCHILD (0x10000 | GW_HWNDLAST)
47
48#ifdef DEBUG
49#define RELEASE_WNDOBJ(a) { a->release(__FUNCTION__, __LINE__); a = NULL; }
50#else
51#define RELEASE_WNDOBJ(a) { a->release(); a = NULL; }
52#endif
53
54typedef struct {
55 USHORT cb;
56 Win32BaseWindow *win32wnd;
57 ULONG win32CreateStruct; //or dialog create dword
58} CUSTOMWNDDATA;
59
60typedef struct tagPROPERTY
61{
62 struct tagPROPERTY *next; /* Next property in window list */
63 HANDLE handle; /* User's data */
64 LPSTR string; /* Property string (or atom) */
65} PROPERTY;
66
67#define HAS_DLGFRAME(style,exStyle) \
68 (((exStyle) & WS_EX_DLGMODALFRAME) || \
69 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
70
71#define HAS_THICKFRAME(style,exStyle) \
72 (((style) & WS_THICKFRAME) && \
73 !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
74#if 0
75 (((style) & WS_THICKFRAME) && \
76 !((exStyle) & WS_EX_DLGMODALFRAME) && \
77 !((style) & WS_CHILD))
78#endif
79
80#define HAS_THINFRAME(style) \
81 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
82
83#define HAS_BIGFRAME(style,exStyle) \
84 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
85 ((exStyle) & WS_EX_DLGMODALFRAME))
86
87#define HAS_ANYFRAME(style,exStyle) \
88 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
89 ((exStyle) & WS_EX_DLGMODALFRAME) || \
90 !((style) & (WS_CHILD | WS_POPUP)))
91
92#define HAS_3DFRAME(exStyle) \
93 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))
94
95#define HAS_BORDER(style, exStyle) \
96 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))
97
98#define IS_OVERLAPPED(style) \
99 !(style & (WS_CHILD | WS_POPUP))
100
101#define HAS_MENU() (!(getStyle() & WS_CHILD) && (getWindowId() != 0))
102
103#define STATE_INIT 0 //initial state
104#define STATE_PRE_WMNCCREATE 1 //before WM_NCCREATE
105#define STATE_POST_WMNCCREATE 2 //after WM_NCCREATE
106#define STATE_PRE_WMCREATE 3 //before WM_CREATE
107#define STATE_POST_WMCREATE 4 //after WM_CREATE
108#define STATE_CREATED 5 //after successful return of WinCreateWindow
109#define STATE_DESTROYED 6 //DestroyWindow called for window
110
111
112class Win32BaseWindow : public GenericObject, public ChildWindow
113{
114public:
115 Win32BaseWindow();
116 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
117
118virtual ~Win32BaseWindow();
119
120virtual ULONG MsgCreate(HWND hwndOS2);
121 ULONG MsgQuit();
122 ULONG MsgClose();
123 ULONG MsgDestroy();
124virtual ULONG MsgEnable(BOOL fEnable);
125 ULONG MsgShow(BOOL fShow);
126 ULONG MsgPosChanging(LPARAM lp);
127 ULONG MsgPosChanged(LPARAM lp);
128 ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd, HWND hwndOS2Win);
129 ULONG MsgChildActivate(BOOL fActivate);
130 ULONG MsgSetFocus(HWND hwnd);
131 ULONG MsgKillFocus(HWND hwnd);
132 ULONG MsgScroll(ULONG msg, ULONG scrollCode, ULONG scrollPos);
133 ULONG MsgButton(MSG *msg);
134 ULONG MsgMouseMove(MSG *msg);
135 ULONG MsgChar(MSG *msg);
136 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE);
137 ULONG MsgEraseBackGround(HDC hdc);
138 ULONG MsgNCPaint(PRECT pUpdateRect);
139 ULONG MsgFormatFrame(WINDOWPOS *lpWndPos);
140 ULONG DispatchMsgA(MSG *msg);
141 ULONG DispatchMsgW(MSG *msg);
142
143 ULONG MsgSetText(LPSTR lpsz, LONG cch);
144 ULONG MsgGetTextLength();
145 void MsgGetText(char *wndtext, ULONG textlength);
146
147virtual LONG SetWindowLong(int index, ULONG value, BOOL fUnicode);
148virtual ULONG GetWindowLong(int index, BOOL fUnicode);
149virtual WORD SetWindowWord(int index, WORD value);
150virtual WORD GetWindowWord(int index);
151
152 DWORD getStyle() { return dwStyle; };
153 DWORD getOldStyle() { return dwOldStyle; };
154 void setStyle(DWORD newstyle) { dwStyle = newstyle; };
155 void setOldStyle(DWORD oldStyle) { dwOldStyle = oldStyle; };
156 DWORD getExStyle() { return dwExStyle; };
157 void setExStyle(DWORD newexstyle) { dwExStyle = newexstyle; };
158 ULONG getInstance() { return hInstance; };
159 void setInstance(ULONG newinstance) { hInstance = newinstance; };
160 HWND getWindowHandle() { return Win32Hwnd; };
161 HWND getOS2WindowHandle() { return OS2Hwnd; };
162 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; };
163 HWND getLastActive() { return hwndLastActive; };
164 void setLastActive(HWND _hwndLastActive)
165 { hwndLastActive = _hwndLastActive; };
166 BOOL isDragDropActive() { return fIsDragDropActive; };
167 void setDragDropActive(BOOL fActive) { fIsDragDropActive = fActive; };
168
169 Win32WndClass *getWindowClass() { return windowClass; };
170
171 LONG getLastHitTestVal() { return lastHitTestVal; }
172 void setLastHitTestVal(LONG hittest) { lastHitTestVal = hittest; }
173
174 DWORD getWindowContextHelpId() { return contextHelpId; };
175 void setWindowContextHelpId(DWORD id){ contextHelpId = id; };
176
177 BOOL isFrameWindow();
178virtual BOOL isMDIClient();
179virtual BOOL isMDIChild();
180virtual BOOL isDesktopWindow();
181virtual BOOL isFakeWindow();
182
183 BOOL fHasParentDC() { return fParentDC; };
184
185Win32BaseWindow *getParent();
186 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
187 WNDPROC getWindowProc() { return win32wndproc; };
188 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
189 DWORD getWindowId() { return dwIDMenu; };
190 void setWindowId(DWORD id) { dwIDMenu = id; };
191 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
192 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
193 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
194 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
195 BOOL isChild();
196 PRECT getClientRectPtr() { return &rectClient; };
197 void getClientRect(PRECT rect)
198 {
199 *rect = rectClient;
200 rect->right -= rect->left;
201 rect->bottom -= rect->top;
202 rect->left = rect->top = 0;
203 }
204 void setClientRect(PRECT rect) { rectClient = *rect; };
205virtual PRECT getWindowRect();
206 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
207 {
208 rectClient.left = left; rectClient.top = top;
209 rectClient.right = right; rectClient.bottom = bottom;
210 };
211 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
212 {
213 rectWindow.left = left; rectWindow.top = top;
214 rectWindow.right = right; rectWindow.bottom = bottom;
215 };
216 void setWindowRect(PRECT rect) { rectWindow = *rect; };
217 DWORD getFlags() { return flags; };
218 void setFlags(DWORD newflags) { flags = newflags; };
219
220 DWORD getCBExtra() { return cbExtra; };
221 PVOID getExtraPtr() { return pExtra; };
222
223 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
224 HMENU GetSysMenu() { return hSysMenu; }
225
226 HICON IconForWindow(WPARAM fType);
227
228 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
229 HRGN GetWindowRegion() { return hWindowRegion; };
230
231 //Save old clip region for CS_OWNDC windows (in BeginPaint)
232 HRGN GetClipRegion() { return hClipRegion; };
233 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
234
235 void saveAndValidateUpdateRegion();
236 void checkForDirtyUpdateRegion();
237 BOOL hasDirtUpdateRegion() { return fDirtyUpdateRegion; };
238
239 BOOL ShowWindow(ULONG nCmdShow);
240virtual BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags, BOOL fShowWindow = FALSE);
241 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
242 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
243 BOOL ScrollWindow(int dx, int dy);
244virtual BOOL DestroyWindow();
245 HWND SetActiveWindow();
246 BOOL DeactivateChildWindow();
247 HWND GetParent();
248 HWND SetParent(HWND hwndNewParent);
249
250 BOOL IsChild(HWND hwndParent);
251
252 HWND GetTopWindow();
253 HWND GetTopParent();
254
255 PVOID getOldPMWindowProc() { return pfnOldPMWndProc; };
256 void setOldPMWindowProc(PVOID pfnPMWndProc) { pfnOldPMWndProc = pfnPMWndProc; };
257
258 HWND GetWindow(UINT uCmd);
259 virtual BOOL EnableWindow(BOOL fEnable);
260 BOOL CloseWindow();
261 static HWND GetActiveWindow();
262 //Window handle has already been verified, so just return true
263 BOOL IsWindow() { return TRUE; };
264 BOOL IsDialog() { return fIsDialog; };
265 BOOL IsModalDialog() { return fIsModalDialog; };
266 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
267 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
268 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
269 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
270 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
271 BOOL IsParentChanging() { return fParentChange; };
272 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
273 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
274 BOOL IsWindowIconic();
275
276//hack alert (see DestroyWindow)
277 BOOL IsChildDestructionInProgress() { return fChildDestructionInProgress; };
278 void SetChildDestructionInProgress(BOOL fDestuctionInProgress)
279 {
280 fChildDestructionInProgress = fDestuctionInProgress;
281 };
282//hack end
283
284 //Window procedure type
285 BOOL IsWindowUnicode();
286 BOOL IsMixMaxStateChanging() { return fMinMaxChange; };
287
288 void SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
289 BOOL IsVisibleRegionChanged() { return fVisibleRegionChanged; };
290 BOOL setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData);
291 void callVisibleRgnNotifyProc(BOOL fDrawingAllowed);
292 BOOL isLocked() { return fWindowLocked; };
293
294 BOOL queryOpenDCs(HDC *phdcWindow, int chdcWindow, int *pnrdcs);
295 void addOpenDC(HDC hdc);
296 void removeOpenDC(HDC hdc);
297
298 int GetWindowTextLength(BOOL fUnicode);
299 int GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
300 int GetWindowTextLengthW() { return GetWindowTextLength(TRUE); };
301
302 int GetWindowTextA(LPSTR lpsz, int cch);
303 int GetWindowTextW(LPWSTR lpsz, int cch);
304 BOOL SetWindowTextA(LPSTR lpsz);
305 BOOL SetWindowTextW(LPWSTR lpsz);
306 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
307 CHAR *getWindowNamePtrA();
308 WCHAR *getWindowNamePtrW();
309 VOID freeWindowNamePtr(PVOID namePtr);
310 CHAR *getWindowNameA() { return windowNameA; }; //only for MDI windows!
311 WCHAR *getWindowNameW() { return windowNameW; }; //only for MDI windows!
312 int getWindowNameLength() { return windowNameLength; };
313 Win32WndClass *getClass() { return windowClass; };
314 Win32BaseWindow *getOwner() { return owner; };
315 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
316
317
318 DWORD getThreadId() { return dwThreadId; };
319 DWORD getProcessId() { return dwProcessId; };
320
321 SCROLLBAR_INFO *getScrollInfo(int nBar);
322
323 LRESULT DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
324 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
325
326 LRESULT DefWndControlColor(UINT ctlType, HDC hdc);
327 LRESULT DefWndPrint(HDC hdc,ULONG uFlags);
328
329 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
330
331 HWND FindWindowById(int id);
332
333 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow);
334
335 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
336 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
337 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
338
339
340 BOOL isComingToTop() { return fComingToTop; };
341 void setComingToTop(BOOL fTop) { fComingToTop = fTop; };
342 BOOL isInTasklist() { return fTaskList; };
343
344 //window property methods
345 HANDLE getProp(LPCSTR str);
346 BOOL setProp(LPCSTR str, HANDLE handle);
347 HANDLE removeProp(LPCSTR str);
348 INT enumPropsExA(PROPENUMPROCEXA func, LPARAM lParam);
349 INT enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
350
351#ifdef DEBUG
352 LONG addRef();
353 LONG release(char *function = __FUNCTION__, int line = __LINE__ );
354#endif
355
356//Locates window in linked list and increases reference count (if found)
357//Window object must be unreferenced after usage
358static Win32BaseWindow *GetWindowFromHandle(HWND hwnd);
359static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd);
360static Win32BaseWindow *GetWindowFromOS2FrameHandle(HWND hwnd);
361
362 static void DestroyAll();
363
364protected:
365#ifndef OS2_INCLUDED
366 BOOL CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
367#endif
368 void Init();
369
370 void NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
371
372 //called in destructor to remove all (if any) window properties
373 void removeWindowProps();
374 PROPERTY *findWindowProperty(LPCSTR str);
375
376 HWND OS2Hwnd, OS2HwndFrame;
377 HMENU hSysMenu;
378 HWND Win32Hwnd;
379
380 int posx, posy, width, height;
381
382 // values normally contained in the standard window words
383 ULONG dwExStyle; //GWL_EXSTYLE
384 ULONG dwStyle; //GWL_STYLE
385 ULONG dwOldStyle; //Used to determine which frame control buttons to change (OS/2 mode)
386 WNDPROC win32wndproc; //GWL_WNDPROC
387 ULONG hInstance; //GWL_HINSTANCE
388//Moved in ChildWindow class
389///// Win32BaseWindow *parent; //GWL_HWNDPARENT
390 ULONG dwIDMenu; //GWL_ID
391 ULONG userData; //GWL_USERDATA
392 HWND hwndLastActive; // last active popup handle
393
394 ULONG cbExtra;
395 PVOID pExtra;
396
397 HWND hwndLinkAfter;
398 DWORD flags;
399 DWORD contextHelpId;
400 DWORD hotkey;
401 LONG lastHitTestVal; //Last value returned by WM_NCHITTEST handler
402
403 HWND OS2HwndModalDialog;
404
405 ULONG fFirstShow:1,
406 fIsDialog:1,
407 fIsModalDialog:1,
408 fIsModalDialogOwner:1,
409 fParentChange:1,
410 fDestroyWindowCalled:1, //DestroyWindow was called for this window
411 fChildDestructionInProgress:1,
412 fTaskList:1, //should be listed in PM tasklist or not
413 fXDefault:1,
414 fCXDefault:1,
415 fParentDC:1,
416 fComingToTop:1,
417 isUnicode:1,
418 fMinMaxChange:1, //set when switching between min/max/restored state
419 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
420 fEraseBkgndFlag:1,
421 fIsDragDropActive:1,
422 fDirtyUpdateRegion:1,
423 fWindowLocked:1;
424
425 ULONG state;
426 HRGN hWindowRegion;
427 HRGN hClipRegion;
428 HRGN hUpdateRegion;
429
430 DWORD dwThreadId; //id of thread that created this window
431 DWORD dwProcessId; //id of process that created this window
432
433 //array of open window DCs
434 HDC hdcWindow[MAX_OPENDCS];
435 int nrOpenDCs;
436
437 Win32BaseWindow *owner;
438 HICON hIcon,hIconSm;
439
440 char *windowNameA;
441 WCHAR *windowNameW;
442 int windowNameLength;
443
444 char *userWindowBytes;
445 ULONG nrUserWindowBytes;
446
447 RECT rectWindow; //relative to parent
448 RECT rectClient; //relative to frame
449WINDOWPLACEMENT windowpos;
450
451 PVOID pfnOldPMWndProc;
452
453 PROPERTY *propertyList;
454
455VISRGN_NOTIFY_PROC lpVisRgnNotifyProc;
456 DWORD dwVisRgnNotifyParam;
457
458 HANDLE hTaskList; //PM specific (switchentry handle)
459
460CREATESTRUCTA *tmpcs; //temporary pointer to CREATESTRUCT used in CreateWindowEx
461 ULONG sw; //set in CreateWindowExA, used in MsgCreate method
462
463SCROLLBAR_INFO *vertScrollInfo;
464SCROLLBAR_INFO *horzScrollInfo;
465
466Win32WndClass *windowClass;
467
468static GenericObject *windows;
469static CRITICAL_SECTION critsect;
470
471private:
472#ifndef OS2_INCLUDED
473 void GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
474 UINT MinMaximize(UINT cmd, LPRECT lpRect);
475 LONG HandleWindowPosChanging(WINDOWPOS *winpos);
476 LONG HandleNCActivate(WPARAM wParam);
477 VOID TrackMinMaxHelpBox(WORD wParam);
478 VOID TrackCloseButton(WORD wParam);
479 VOID TrackScrollBar(WPARAM wParam,POINT pt);
480 LONG HandleNCLButtonDown(WPARAM wParam,LPARAM lParam);
481 LONG HandleNCLButtonDblClk(WPARAM wParam,LPARAM lParam);
482 LONG HandleNCRButtonUp(WPARAM wParam,LPARAM lParam);
483 VOID AdjustRectOuter(LPRECT rect,BOOL menu);
484 VOID AdjustRectInner(LPRECT rect);
485 LONG HandleNCCalcSize(BOOL calcValidRects,RECT *winRect);
486 VOID DrawFrame(HDC hdc,RECT *rect,BOOL dlgFrame,BOOL active);
487public:
488 VOID GetInsideRect(RECT *rect);
489 LONG HandleNCHitTest(POINT pt);
490 BOOL GetSysPopupPos(RECT* rect);
491 BOOL DrawSysButton(HDC hdc,RECT *rect);
492private:
493 BOOL DrawGrayButton(HDC hdc,int x,int y);
494 VOID DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
495 VOID DrawMaxButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
496 VOID DrawMinButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
497 VOID DrawContextHelpButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
498 VOID DrawCaption(HDC hdc,RECT *rect,BOOL active);
499 VOID DoNCPaint(HRGN clip,BOOL suppress_menupaint);
500 LONG HandleNCPaint(HRGN clip);
501 LONG HandleSysCommand(WPARAM wParam, POINT *pt32);
502
503 LONG SendNCCalcSize(BOOL calcValidRect,
504 RECT *newWindowRect, RECT *oldWindowRect,
505 RECT *oldClientRect, WINDOWPOS *winpos,
506 RECT *newClientRect );
507
508#else
509friend BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs);
510#endif
511
512public:
513
514 VOID AdjustMaximizedRect(LPRECT rect);
515 VOID AdjustTrackInfo(PPOINT minTrackSize,PPOINT maxTrackSize);
516
517 //Temporary hack for CS_CLASSDC style (do the same as for CS_OWNDC)
518#ifndef OS2_INCLUDED
519 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC|CS_CLASSDC)); }
520#else
521 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC_W|CS_CLASSDC_W)); }
522#endif
523
524 HDC getOwnDC() { return ownDC; }
525 void setOwnDC(HDC hdc) { ownDC = hdc; }
526protected:
527 HDC ownDC;
528
529public:
530 VOID setEraseBkgnd (BOOL erase) { fEraseBkgndFlag = erase; }
531 BOOL needsEraseBkgnd() { return fEraseBkgndFlag; }
532};
533
534#endif //__cplusplus
535
536#endif //__WIN32WNDBASE_H__
Note: See TracBrowser for help on using the repository browser.