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

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

Changes for fake windows. Moved them into a seperate C++ class and overload some methods to correct the behaviour

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