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

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

* empty log message *

File size: 21.3 KB
Line 
1/* $Id: win32wbase.h,v 1.129 2001-10-03 22:34:32 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 GW_HWNDNEXTCHILD (0x10000 | GW_HWNDNEXT)
40#define GW_HWNDFIRSTCHILD (0x10000 | GW_CHILD)
41#define GW_HWNDLASTCHILD (0x10000 | GW_HWNDLAST)
42
43#ifdef DEBUG
44#define RELEASE_WNDOBJ(a) { a->release(__FUNCTION__, __LINE__); a = NULL; }
45#else
46#define RELEASE_WNDOBJ(a) { a->release(); a = NULL; }
47#endif
48
49typedef struct {
50 USHORT cb;
51 Win32BaseWindow *win32wnd;
52 ULONG win32CreateStruct; //or dialog create dword
53} CUSTOMWNDDATA;
54
55typedef struct tagPROPERTY
56{
57 struct tagPROPERTY *next; /* Next property in window list */
58 HANDLE handle; /* User's data */
59 LPSTR string; /* Property string (or atom) */
60} PROPERTY;
61
62//PostThreadMessage is done through Open32; which means the message id will be translated
63//(0xc00 added)
64#define OPEN32_MSGDIFF 0xC00
65#define WIN32APP_POSTMSG (0x1000+OPEN32_MSGDIFF)
66
67//PM doesn't allow SetFocus during WM_SETFOCUS message processing; must delay
68//this by posting a message
69//NOTE Must be smaller than WIN32APP_POSTMSG!
70#define WIN32APP_SETFOCUSMSG (WIN32APP_POSTMSG-1)
71
72#define WIN32MSG_MAGICA 0x12345678
73#define WIN32MSG_MAGICW 0x12345679
74
75typedef struct
76{
77 ULONG wParam;
78 ULONG lParam;
79} POSTMSG_PACKET;
80
81#define BROADCAST_SEND 0
82#define BROADCAST_POST 1
83
84#define HAS_DLGFRAME(style,exStyle) \
85 (((exStyle) & WS_EX_DLGMODALFRAME) || \
86 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
87
88#define HAS_THICKFRAME(style,exStyle) \
89 (((style) & WS_THICKFRAME) && \
90 !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
91#if 0
92 (((style) & WS_THICKFRAME) && \
93 !((exStyle) & WS_EX_DLGMODALFRAME) && \
94 !((style) & WS_CHILD))
95#endif
96
97#define HAS_THINFRAME(style) \
98 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
99
100#define HAS_BIGFRAME(style,exStyle) \
101 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
102 ((exStyle) & WS_EX_DLGMODALFRAME))
103
104#define HAS_ANYFRAME(style,exStyle) \
105 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
106 ((exStyle) & WS_EX_DLGMODALFRAME) || \
107 !((style) & (WS_CHILD | WS_POPUP)))
108
109#define HAS_3DFRAME(exStyle) \
110 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))
111
112#define HAS_BORDER(style, exStyle) \
113 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))
114
115#define IS_OVERLAPPED(style) \
116 !(style & (WS_CHILD | WS_POPUP))
117
118#define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0))
119
120#define STATE_INIT 0 //initial state
121#define STATE_PRE_WMNCCREATE 1 //before WM_NCCREATE
122#define STATE_POST_WMNCCREATE 2 //after WM_NCCREATE
123#define STATE_PRE_WMCREATE 3 //before WM_CREATE
124#define STATE_POST_WMCREATE 4 //after WM_CREATE
125#define STATE_CREATED 5 //after successful return of WinCreateWindow
126#define STATE_DESTROYED 6 //DestroyWindow called for window
127
128
129class Win32BaseWindow : public GenericObject, public ChildWindow
130{
131public:
132 Win32BaseWindow();
133 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
134 Win32BaseWindow(HWND hwndOS2, ULONG reserved);
135
136virtual ~Win32BaseWindow();
137
138virtual ULONG MsgCreate(HWND hwndOS2);
139 ULONG MsgQuit();
140 ULONG MsgClose();
141 ULONG MsgDestroy();
142virtual ULONG MsgEnable(BOOL fEnable);
143 ULONG MsgShow(BOOL fShow);
144 ULONG MsgPosChanging(LPARAM lp);
145 ULONG MsgPosChanged(LPARAM lp);
146 ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd, HWND hwndOS2Win);
147 ULONG MsgChildActivate(BOOL fActivate);
148 ULONG MsgSetFocus(HWND hwnd);
149 ULONG MsgKillFocus(HWND hwnd);
150 ULONG MsgScroll(ULONG msg, ULONG scrollCode, ULONG scrollPos);
151 ULONG MsgButton(MSG *msg);
152 ULONG MsgMouseMove(MSG *msg);
153 ULONG MsgChar(MSG *msg);
154 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE);
155 ULONG MsgEraseBackGround(HDC hdc);
156 ULONG MsgNCPaint(PRECT pUpdateRect);
157 ULONG MsgFormatFrame(WINDOWPOS *lpWndPos);
158 ULONG DispatchMsgA(MSG *msg);
159 ULONG DispatchMsgW(MSG *msg);
160
161 ULONG MsgSetText(LPSTR lpsz, LONG cch);
162 ULONG MsgGetTextLength();
163 void MsgGetText(char *wndtext, ULONG textlength);
164 VOID updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
165
166virtual LONG SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
167virtual ULONG GetWindowLongA(int index, BOOL fUnicode = FALSE);
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 DWORD getExStyle() { return dwExStyle; };
175 void setExStyle(DWORD newexstyle) { dwExStyle = newexstyle; };
176 ULONG getInstance() { return hInstance; };
177 void setInstance(ULONG newinstance) { hInstance = newinstance; };
178 HWND getWindowHandle() { return Win32Hwnd; };
179 HWND getOS2WindowHandle() { return OS2Hwnd; };
180 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; };
181
182 Win32WndClass *getWindowClass() { return windowClass; };
183
184 LONG getLastHitTestVal() { return lastHitTestVal; }
185
186 DWORD getWindowContextHelpId() { return contextHelpId; };
187 void setWindowContextHelpId(DWORD id){ contextHelpId = id; };
188
189 BOOL isFrameWindow();
190virtual BOOL isMDIClient();
191virtual BOOL isMDIChild();
192virtual BOOL isDesktopWindow();
193
194 BOOL fHasParentDC() { return fParentDC; };
195
196Win32BaseWindow *getParent();
197 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
198 WNDPROC getWindowProc() { return win32wndproc; };
199 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
200 DWORD getWindowId() { return dwIDMenu; };
201 void setWindowId(DWORD id);
202 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
203 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
204 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
205 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
206 BOOL isChild();
207 PRECT getClientRectPtr() { return &rectClient; };
208 void getClientRect(PRECT rect)
209 {
210 *rect = rectClient;
211 rect->right -= rect->left;
212 rect->bottom -= rect->top;
213 rect->left = rect->top = 0;
214 }
215 void setClientRect(PRECT rect) { rectClient = *rect; };
216 PRECT getWindowRect() { return &rectWindow; };
217 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
218 {
219 rectClient.left = left; rectClient.top = top;
220 rectClient.right = right; rectClient.bottom = bottom;
221 };
222 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
223 {
224 rectWindow.left = left; rectWindow.top = top;
225 rectWindow.right = right; rectWindow.bottom = bottom;
226 };
227 void setWindowRect(PRECT rect) { rectWindow = *rect; };
228 DWORD getFlags() { return flags; };
229 void setFlags(DWORD newflags) { flags = newflags; };
230
231 DWORD getCBExtra() { return cbExtra; };
232 PVOID getExtraPtr() { return pExtra; };
233
234 HMENU GetMenu() { return dwIDMenu; };
235 VOID SetMenu(HMENU newMenu) { dwIDMenu = newMenu; };
236 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
237 HMENU GetSysMenu() { return hSysMenu; }
238
239 HICON IconForWindow(WPARAM fType);
240
241 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
242 HRGN GetWindowRegion() { return hWindowRegion; };
243
244 //Save old clip region for CS_OWNDC windows (in BeginPaint)
245 HRGN GetClipRegion() { return hClipRegion; };
246 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
247
248 BOOL ShowWindow(ULONG nCmdShow);
249 BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags);
250 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
251 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
252 BOOL ScrollWindow(int dx, int dy);
253virtual BOOL DestroyWindow();
254 HWND SetActiveWindow();
255 BOOL DeactivateChildWindow();
256 HWND GetParent();
257 HWND SetParent(HWND hwndNewParent);
258
259 BOOL IsChild(HWND hwndParent);
260
261 HWND GetTopWindow();
262 HWND GetTopParent();
263
264 HWND GetWindow(UINT uCmd);
265 virtual BOOL EnableWindow(BOOL fEnable);
266 BOOL CloseWindow();
267 static HWND GetActiveWindow();
268 //Window handle has already been verified, so just return true
269 BOOL IsWindow() { return TRUE; };
270 BOOL IsDialog() { return fIsDialog; };
271 BOOL IsModalDialog() { return fIsModalDialog; };
272 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
273 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
274 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
275 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
276 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
277 BOOL IsParentChanging() { return fParentChange; };
278 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
279 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
280 BOOL IsWindowIconic();
281 //Window procedure type
282 BOOL IsWindowUnicode();
283 BOOL IsMixMaxStateChanging() { return fMinMaxChange; };
284
285 void SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
286 BOOL IsVisibleRegionChanged() { return fVisibleRegionChanged; };
287 BOOL setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData)
288 {
289 lpVisRgnNotifyProc = lpNotifyProc;
290 dwVisRgnNotifyParam = dwUserData;
291 return TRUE;
292 }
293 void callVisibleRgnNotifyProc(BOOL fDrawingAllowed)
294 {
295 if(lpVisRgnNotifyProc) {
296 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam);
297 }
298 }
299 int GetWindowTextLength(BOOL fUnicode);
300 int GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
301 int GetWindowTextLengthW() { return GetWindowTextLength(TRUE); };
302
303 int GetWindowTextA(LPSTR lpsz, int cch);
304 int GetWindowTextW(LPWSTR lpsz, int cch);
305 BOOL SetWindowTextA(LPSTR lpsz);
306 BOOL SetWindowTextW(LPWSTR lpsz);
307 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
308 CHAR *getWindowNamePtrA();
309 WCHAR *getWindowNamePtrW();
310 VOID freeWindowNamePtr(PVOID namePtr);
311 CHAR *getWindowNameA() { return windowNameA; }; //only for MDI windows!
312 WCHAR *getWindowNameW() { return windowNameW; }; //only for MDI windows!
313Win32WndClass *getClass() { return windowClass; };
314Win32BaseWindow *getOwner() { return owner; };
315 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
316
317 SCROLLBAR_INFO *getScrollInfo(int nBar);
318
319 LRESULT SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
320 LRESULT SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
321static LRESULT BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam);
322static LRESULT BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
323 void CallWindowHookProc(ULONG hooktype, ULONG Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode = FALSE);
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 LRESULT SendInternalMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
371 LRESULT SendInternalMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
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
397 ULONG cbExtra;
398 PVOID pExtra;
399
400 HWND hwndLinkAfter;
401 DWORD flags;
402 DWORD contextHelpId;
403 DWORD hotkey;
404 LONG lastHitTestVal; //Last value returned by WM_NCHITTEST handler
405
406 HWND OS2HwndModalDialog;
407
408 ULONG fFirstShow:1,
409 fIsDialog:1,
410 fIsModalDialog:1,
411 fIsModalDialogOwner:1,
412 fInternalMsg:1, //Used to distinguish between messages
413 //sent by PM and those sent by apps
414 fParentChange:1,
415 fDestroyWindowCalled:1, //DestroyWindow was called for this window
416 fTaskList:1, //should be listed in PM tasklist or not
417 fXDefault:1,
418 fCXDefault:1,
419 fParentDC:1,
420 fComingToTop:1,
421 isUnicode:1,
422 fMinMaxChange:1, //set when switching between min/max/restored state
423 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
424 fEraseBkgndFlag: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
439 char *userWindowBytes;
440 ULONG nrUserWindowBytes;
441
442 RECT rectWindow; //relative to parent
443 RECT rectClient; //relative to frame
444WINDOWPLACEMENT windowpos;
445
446 PROPERTY *propertyList;
447
448VISRGN_NOTIFY_PROC lpVisRgnNotifyProc;
449 DWORD dwVisRgnNotifyParam;
450
451 HANDLE hTaskList; //PM specific (switchentry handle)
452
453CREATESTRUCTA *tmpcs; //temporary pointer to CREATESTRUCT used in CreateWindowEx
454 ULONG sw; //set in CreateWindowExA, used in MsgCreate method
455
456SCROLLBAR_INFO *vertScrollInfo;
457SCROLLBAR_INFO *horzScrollInfo;
458
459Win32WndClass *windowClass;
460
461static GenericObject *windows;
462static CRITICAL_SECTION critsect;
463
464private:
465#ifndef OS2_INCLUDED
466 void GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack );
467 UINT MinMaximize(UINT cmd, LPRECT lpRect);
468 LONG HandleWindowPosChanging(WINDOWPOS *winpos);
469 LONG HandleNCActivate(WPARAM wParam);
470 VOID TrackMinMaxHelpBox(WORD wParam);
471 VOID TrackCloseButton(WORD wParam);
472 VOID TrackScrollBar(WPARAM wParam,POINT pt);
473 LONG HandleNCLButtonDown(WPARAM wParam,LPARAM lParam);
474 LONG HandleNCLButtonDblClk(WPARAM wParam,LPARAM lParam);
475 LONG HandleNCRButtonUp(WPARAM wParam,LPARAM lParam);
476 VOID AdjustRectOuter(LPRECT rect,BOOL menu);
477 VOID AdjustRectInner(LPRECT rect);
478 LONG HandleNCCalcSize(BOOL calcValidRects,RECT *winRect);
479 VOID DrawFrame(HDC hdc,RECT *rect,BOOL dlgFrame,BOOL active);
480public:
481 VOID GetInsideRect(RECT *rect);
482 LONG HandleNCHitTest(POINT pt);
483 BOOL GetSysPopupPos(RECT* rect);
484private:
485 BOOL DrawSysButton(HDC hdc,RECT *rect);
486 BOOL DrawGrayButton(HDC hdc,int x,int y);
487 VOID DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
488 VOID DrawMaxButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
489 VOID DrawMinButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
490 VOID DrawContextHelpButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed);
491 VOID DrawCaption(HDC hdc,RECT *rect,BOOL active);
492 VOID DoNCPaint(HRGN clip,BOOL suppress_menupaint);
493 LONG HandleNCPaint(HRGN clip);
494 LONG HandleSysCommand(WPARAM wParam, POINT *pt32);
495
496 LONG SendNCCalcSize(BOOL calcValidRect,
497 RECT *newWindowRect, RECT *oldWindowRect,
498 RECT *oldClientRect, WINDOWPOS *winpos,
499 RECT *newClientRect );
500
501#else
502friend BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs);
503#endif
504
505public:
506 void SetFakeOpen32() { WinSetDAXData (OS2Hwnd, &fakeWinBase); }
507 void RemoveFakeOpen32() { WinSetDAXData (OS2Hwnd, NULL); }
508
509 fakeOpen32WinBaseClass fakeWinBase;
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.