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

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

Don't change focus when processing mouse button message if the top parent is a fake window

File size: 21.2 KB
Line 
1/* $Id: win32wbase.h,v 1.151 2003-03-27 10:42:42 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();
179virtual BOOL isFakeWindow();
180
181 BOOL fHasParentDC() { return fParentDC; };
182
183Win32BaseWindow *getParent();
184 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
185 WNDPROC getWindowProc() { return win32wndproc; };
186 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
187 DWORD getWindowId() { return dwIDMenu; };
188 void setWindowId(DWORD id) { dwIDMenu = id; };
189 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
190 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
191 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
192 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
193 BOOL isChild();
194 PRECT getClientRectPtr() { return &rectClient; };
195 void getClientRect(PRECT rect)
196 {
197 *rect = rectClient;
198 rect->right -= rect->left;
199 rect->bottom -= rect->top;
200 rect->left = rect->top = 0;
201 }
202 void setClientRect(PRECT rect) { rectClient = *rect; };
203virtual PRECT getWindowRect();
204 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
205 {
206 rectClient.left = left; rectClient.top = top;
207 rectClient.right = right; rectClient.bottom = bottom;
208 };
209 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
210 {
211 rectWindow.left = left; rectWindow.top = top;
212 rectWindow.right = right; rectWindow.bottom = bottom;
213 };
214 void setWindowRect(PRECT rect) { rectWindow = *rect; };
215 DWORD getFlags() { return flags; };
216 void setFlags(DWORD newflags) { flags = newflags; };
217
218 DWORD getCBExtra() { return cbExtra; };
219 PVOID getExtraPtr() { return pExtra; };
220
221 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
222 HMENU GetSysMenu() { return hSysMenu; }
223
224 HICON IconForWindow(WPARAM fType);
225
226 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
227 HRGN GetWindowRegion() { return hWindowRegion; };
228
229 //Save old clip region for CS_OWNDC windows (in BeginPaint)
230 HRGN GetClipRegion() { return hClipRegion; };
231 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
232
233 void saveAndValidateUpdateRegion();
234 void checkForDirtyUpdateRegion();
235 BOOL hasDirtUpdateRegion() { return fDirtyUpdateRegion; };
236
237 BOOL ShowWindow(ULONG nCmdShow);
238virtual BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags, BOOL fShowWindow = FALSE);
239 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
240 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
241 BOOL ScrollWindow(int dx, int dy);
242virtual BOOL DestroyWindow();
243 HWND SetActiveWindow();
244 BOOL DeactivateChildWindow();
245 HWND GetParent();
246 HWND SetParent(HWND hwndNewParent);
247
248 BOOL IsChild(HWND hwndParent);
249
250 HWND GetTopWindow();
251 HWND GetTopParent();
252
253 PVOID getOldPMWindowProc() { return pfnOldPMWndProc; };
254 void setOldPMWindowProc(PVOID pfnPMWndProc) { pfnOldPMWndProc = pfnPMWndProc; };
255
256 HWND GetWindow(UINT uCmd);
257 virtual BOOL EnableWindow(BOOL fEnable);
258 BOOL CloseWindow();
259 static HWND GetActiveWindow();
260 //Window handle has already been verified, so just return true
261 BOOL IsWindow() { return TRUE; };
262 BOOL IsDialog() { return fIsDialog; };
263 BOOL IsModalDialog() { return fIsModalDialog; };
264 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
265 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
266 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
267 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
268 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
269 BOOL IsParentChanging() { return fParentChange; };
270 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
271 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
272 BOOL IsWindowIconic();
273
274//hack alert (see DestroyWindow)
275 BOOL IsChildDestructionInProgress() { return fChildDestructionInProgress; };
276 void SetChildDestructionInProgress(BOOL fDestuctionInProgress)
277 {
278 fChildDestructionInProgress = fDestuctionInProgress;
279 };
280//hack end
281
282 //Window procedure type
283 BOOL IsWindowUnicode();
284 BOOL IsMixMaxStateChanging() { return fMinMaxChange; };
285
286 void SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
287 BOOL IsVisibleRegionChanged() { return fVisibleRegionChanged; };
288 BOOL setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData)
289 {
290 lpVisRgnNotifyProc = lpNotifyProc;
291 dwVisRgnNotifyParam = dwUserData;
292 return TRUE;
293 }
294 void callVisibleRgnNotifyProc(BOOL fDrawingAllowed)
295 {
296 if(lpVisRgnNotifyProc) {
297 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam);
298 }
299 }
300 int GetWindowTextLength(BOOL fUnicode);
301 int GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
302 int GetWindowTextLengthW() { return GetWindowTextLength(TRUE); };
303
304 int GetWindowTextA(LPSTR lpsz, int cch);
305 int GetWindowTextW(LPWSTR lpsz, int cch);
306 BOOL SetWindowTextA(LPSTR lpsz);
307 BOOL SetWindowTextW(LPWSTR lpsz);
308 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
309 CHAR *getWindowNamePtrA();
310 WCHAR *getWindowNamePtrW();
311 VOID freeWindowNamePtr(PVOID namePtr);
312 CHAR *getWindowNameA() { return windowNameA; }; //only for MDI windows!
313 WCHAR *getWindowNameW() { return windowNameW; }; //only for MDI windows!
314 int getWindowNameLength() { return windowNameLength; };
315 Win32WndClass *getClass() { return windowClass; };
316 Win32BaseWindow *getOwner() { return owner; };
317 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
318
319
320 DWORD getThreadId() { return dwThreadId; };
321 DWORD getProcessId() { return dwProcessId; };
322
323 SCROLLBAR_INFO *getScrollInfo(int nBar);
324
325 LRESULT DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
326 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
327
328 LRESULT DefWndControlColor(UINT ctlType, HDC hdc);
329 LRESULT DefWndPrint(HDC hdc,ULONG uFlags);
330
331 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
332
333 HWND FindWindowById(int id);
334
335 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow);
336
337 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
338 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
339 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
340
341
342 BOOL isComingToTop() { return fComingToTop; };
343 void setComingToTop(BOOL fTop) { fComingToTop = fTop; };
344 BOOL isInTasklist() { return fTaskList; };
345
346 //window property methods
347 HANDLE getProp(LPCSTR str);
348 BOOL setProp(LPCSTR str, HANDLE handle);
349 HANDLE removeProp(LPCSTR str);
350 INT enumPropsExA(PROPENUMPROCEXA func, LPARAM lParam);
351 INT enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
352
353#ifdef DEBUG
354 LONG addRef();
355 LONG release(char *function = __FUNCTION__, int line = __LINE__ );
356#endif
357
358//Locates window in linked list and increases reference count (if found)
359//Window object must be unreferenced after usage
360static Win32BaseWindow *GetWindowFromHandle(HWND hwnd);
361static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd);
362static Win32BaseWindow *GetWindowFromOS2FrameHandle(HWND hwnd);
363
364 static void DestroyAll();
365
366protected:
367#ifndef OS2_INCLUDED
368 BOOL CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
369#endif
370 void Init();
371
372 void NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
373
374 //called in destructor to remove all (if any) window properties
375 void removeWindowProps();
376 PROPERTY *findWindowProperty(LPCSTR str);
377
378 HWND OS2Hwnd, OS2HwndFrame;
379 HMENU hSysMenu;
380 HWND Win32Hwnd;
381
382 int posx, posy, width, height;
383
384 // values normally contained in the standard window words
385 ULONG dwExStyle; //GWL_EXSTYLE
386 ULONG dwStyle; //GWL_STYLE
387 ULONG dwOldStyle; //Used to determine which frame control buttons to change (OS/2 mode)
388 WNDPROC win32wndproc; //GWL_WNDPROC
389 ULONG hInstance; //GWL_HINSTANCE
390//Moved in ChildWindow class
391///// Win32BaseWindow *parent; //GWL_HWNDPARENT
392 ULONG dwIDMenu; //GWL_ID
393 ULONG userData; //GWL_USERDATA
394 HWND hwndLastActive; // last active popup handle
395
396 ULONG cbExtra;
397 PVOID pExtra;
398
399 HWND hwndLinkAfter;
400 DWORD flags;
401 DWORD contextHelpId;
402 DWORD hotkey;
403 LONG lastHitTestVal; //Last value returned by WM_NCHITTEST handler
404
405 HWND OS2HwndModalDialog;
406
407 ULONG fFirstShow:1,
408 fIsDialog:1,
409 fIsModalDialog:1,
410 fIsModalDialogOwner:1,
411 fParentChange:1,
412 fDestroyWindowCalled:1, //DestroyWindow was called for this window
413 fChildDestructionInProgress:1,
414 fTaskList:1, //should be listed in PM tasklist or not
415 fXDefault:1,
416 fCXDefault:1,
417 fParentDC:1,
418 fComingToTop:1,
419 isUnicode:1,
420 fMinMaxChange:1, //set when switching between min/max/restored state
421 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
422 fEraseBkgndFlag:1,
423 fIsDragDropActive:1,
424 fDirtyUpdateRegion:1;
425
426 ULONG state;
427 HRGN hWindowRegion;
428 HRGN hClipRegion;
429 HRGN hUpdateRegion;
430
431 DWORD dwThreadId; //id of thread that created this window
432 DWORD dwProcessId; //id of process that created this window
433
434 Win32BaseWindow *owner;
435 HICON hIcon,hIconSm;
436
437 char *windowNameA;
438 WCHAR *windowNameW;
439 int windowNameLength;
440
441 char *userWindowBytes;
442 ULONG nrUserWindowBytes;
443
444 RECT rectWindow; //relative to parent
445 RECT rectClient; //relative to frame
446WINDOWPLACEMENT windowpos;
447
448 PVOID pfnOldPMWndProc;
449
450 PROPERTY *propertyList;
451
452VISRGN_NOTIFY_PROC lpVisRgnNotifyProc;
453 DWORD dwVisRgnNotifyParam;
454
455 HANDLE hTaskList; //PM specific (switchentry handle)
456
457CREATESTRUCTA *tmpcs; //temporary pointer to CREATESTRUCT used in CreateWindowEx
458 ULONG sw; //set in CreateWindowExA, used in MsgCreate method
459
460SCROLLBAR_INFO *vertScrollInfo;
461SCROLLBAR_INFO *horzScrollInfo;
462
463Win32WndClass *windowClass;
464
465static GenericObject *windows;
466static CRITICAL_SECTION critsect;
467
468private:
469#ifndef OS2_INCLUDED
470 void GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
471 UINT MinMaximize(UINT cmd, LPRECT lpRect);
472 LONG HandleWindowPosChanging(WINDOWPOS *winpos);
473 LONG HandleNCActivate(WPARAM wParam);
474 VOID TrackMinMaxHelpBox(WORD wParam);
475 VOID TrackCloseButton(WORD wParam);
476 VOID TrackScrollBar(WPARAM wParam,POINT pt);
477 LONG HandleNCLButtonDown(WPARAM wParam,LPARAM lParam);
478 LONG HandleNCLButtonDblClk(WPARAM wParam,LPARAM lParam);
479 LONG HandleNCRButtonUp(WPARAM wParam,LPARAM lParam);
480 VOID AdjustRectOuter(LPRECT rect,BOOL menu);
481 VOID AdjustRectInner(LPRECT rect);
482 LONG HandleNCCalcSize(BOOL calcValidRects,RECT *winRect);
483 VOID DrawFrame(HDC hdc,RECT *rect,BOOL dlgFrame,BOOL active);
484public:
485 VOID GetInsideRect(RECT *rect);
486 LONG HandleNCHitTest(POINT pt);
487 BOOL GetSysPopupPos(RECT* rect);
488 BOOL DrawSysButton(HDC hdc,RECT *rect);
489private:
490 BOOL DrawGrayButton(HDC hdc,int x,int y);
491 VOID DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
492 VOID DrawMaxButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
493 VOID DrawMinButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
494 VOID DrawContextHelpButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
495 VOID DrawCaption(HDC hdc,RECT *rect,BOOL active);
496 VOID DoNCPaint(HRGN clip,BOOL suppress_menupaint);
497 LONG HandleNCPaint(HRGN clip);
498 LONG HandleSysCommand(WPARAM wParam, POINT *pt32);
499
500 LONG SendNCCalcSize(BOOL calcValidRect,
501 RECT *newWindowRect, RECT *oldWindowRect,
502 RECT *oldClientRect, WINDOWPOS *winpos,
503 RECT *newClientRect );
504
505#else
506friend BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs);
507#endif
508
509public:
510
511 VOID AdjustMaximizedRect(LPRECT rect);
512 VOID AdjustTrackInfo(PPOINT minTrackSize,PPOINT maxTrackSize);
513
514 //Temporary hack for CS_CLASSDC style (do the same as for CS_OWNDC)
515#ifndef OS2_INCLUDED
516 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC|CS_CLASSDC)); }
517#else
518 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC_W|CS_CLASSDC_W)); }
519#endif
520
521 HDC getOwnDC() { return ownDC; }
522 void setOwnDC(HDC hdc) { ownDC = hdc; }
523protected:
524 HDC ownDC;
525
526public:
527 VOID setEraseBkgnd (BOOL erase) { fEraseBkgndFlag = erase; }
528 BOOL needsEraseBkgnd() { return fEraseBkgndFlag; }
529};
530
531#endif //__cplusplus
532
533#endif //__WIN32WNDBASE_H__
Note: See TracBrowser for help on using the repository browser.