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

Last change on this file since 8266 was 8016, checked in by sandervl, 24 years ago

GetWindowThreadProcessId changes

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