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

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

added visible region callback function

File size: 21.2 KB
Line 
1/* $Id: win32wbase.h,v 1.127 2001-09-30 22:24: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 "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#ifdef DEBUG
40#define RELEASE_WNDOBJ(a) { a->release(__FUNCTION__, __LINE__); a = NULL; }
41#else
42#define RELEASE_WNDOBJ(a) { a->release(); a = NULL; }
43#endif
44
45typedef struct {
46 USHORT cb;
47 Win32BaseWindow *win32wnd;
48 ULONG win32CreateStruct; //or dialog create dword
49} CUSTOMWNDDATA;
50
51typedef struct tagPROPERTY
52{
53 struct tagPROPERTY *next; /* Next property in window list */
54 HANDLE handle; /* User's data */
55 LPSTR string; /* Property string (or atom) */
56} PROPERTY;
57
58//PostThreadMessage is done through Open32; which means the message id will be translated
59//(0xc00 added)
60#define OPEN32_MSGDIFF 0xC00
61#define WIN32APP_POSTMSG (0x1000+OPEN32_MSGDIFF)
62
63//PM doesn't allow SetFocus during WM_SETFOCUS message processing; must delay
64//this by posting a message
65//NOTE Must be smaller than WIN32APP_POSTMSG!
66#define WIN32APP_SETFOCUSMSG (WIN32APP_POSTMSG-1)
67
68#define WIN32MSG_MAGICA 0x12345678
69#define WIN32MSG_MAGICW 0x12345679
70
71typedef struct
72{
73 ULONG wParam;
74 ULONG lParam;
75} POSTMSG_PACKET;
76
77#define BROADCAST_SEND 0
78#define BROADCAST_POST 1
79
80#define HAS_DLGFRAME(style,exStyle) \
81 (((exStyle) & WS_EX_DLGMODALFRAME) || \
82 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
83
84#define HAS_THICKFRAME(style,exStyle) \
85 (((style) & WS_THICKFRAME) && \
86 !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
87#if 0
88 (((style) & WS_THICKFRAME) && \
89 !((exStyle) & WS_EX_DLGMODALFRAME) && \
90 !((style) & WS_CHILD))
91#endif
92
93#define HAS_THINFRAME(style) \
94 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
95
96#define HAS_BIGFRAME(style,exStyle) \
97 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \
98 ((exStyle) & WS_EX_DLGMODALFRAME))
99
100#define HAS_ANYFRAME(style,exStyle) \
101 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \
102 ((exStyle) & WS_EX_DLGMODALFRAME) || \
103 !((style) & (WS_CHILD | WS_POPUP)))
104
105#define HAS_3DFRAME(exStyle) \
106 ((exStyle & WS_EX_CLIENTEDGE) || (exStyle & WS_EX_STATICEDGE) || (exStyle & WS_EX_WINDOWEDGE))
107
108#define HAS_BORDER(style, exStyle) \
109 ((style & WS_BORDER) || HAS_THICKFRAME(style) || HAS_DLGFRAME(style,exStyle))
110
111#define IS_OVERLAPPED(style) \
112 !(style & (WS_CHILD | WS_POPUP))
113
114#define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0))
115
116#define STATE_INIT 0 //initial state
117#define STATE_PRE_WMNCCREATE 1 //before WM_NCCREATE
118#define STATE_POST_WMNCCREATE 2 //after WM_NCCREATE
119#define STATE_PRE_WMCREATE 3 //before WM_CREATE
120#define STATE_POST_WMCREATE 4 //after WM_CREATE
121#define STATE_CREATED 5 //after successful return of WinCreateWindow
122#define STATE_DESTROYED 6 //DestroyWindow called for window
123
124
125class Win32BaseWindow : public GenericObject, public ChildWindow
126{
127public:
128 Win32BaseWindow();
129 Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
130 Win32BaseWindow(HWND hwndOS2, ULONG reserved);
131
132virtual ~Win32BaseWindow();
133
134virtual ULONG MsgCreate(HWND hwndOS2);
135 ULONG MsgQuit();
136 ULONG MsgClose();
137 ULONG MsgDestroy();
138virtual ULONG MsgEnable(BOOL fEnable);
139 ULONG MsgShow(BOOL fShow);
140 ULONG MsgPosChanging(LPARAM lp);
141 ULONG MsgPosChanged(LPARAM lp);
142 ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd, HWND hwndOS2Win);
143 ULONG MsgChildActivate(BOOL fActivate);
144 ULONG MsgSetFocus(HWND hwnd);
145 ULONG MsgKillFocus(HWND hwnd);
146 ULONG MsgScroll(ULONG msg, ULONG scrollCode, ULONG scrollPos);
147 ULONG MsgButton(MSG *msg);
148 ULONG MsgMouseMove(MSG *msg);
149 ULONG MsgChar(MSG *msg);
150 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE);
151 ULONG MsgEraseBackGround(HDC hdc);
152 ULONG MsgNCPaint(PRECT pUpdateRect);
153 ULONG MsgFormatFrame(WINDOWPOS *lpWndPos);
154 ULONG DispatchMsgA(MSG *msg);
155 ULONG DispatchMsgW(MSG *msg);
156
157 ULONG MsgSetText(LPSTR lpsz, LONG cch);
158 ULONG MsgGetTextLength();
159 void MsgGetText(char *wndtext, ULONG textlength);
160 VOID updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
161
162virtual LONG SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
163virtual ULONG GetWindowLongA(int index, BOOL fUnicode = FALSE);
164virtual WORD SetWindowWord(int index, WORD value);
165virtual WORD GetWindowWord(int index);
166
167 DWORD getStyle() { return dwStyle; };
168 DWORD getOldStyle() { return dwOldStyle; };
169 void setStyle(DWORD newstyle) { dwStyle = newstyle; };
170 DWORD getExStyle() { return dwExStyle; };
171 void setExStyle(DWORD newexstyle) { dwExStyle = newexstyle; };
172 ULONG getInstance() { return hInstance; };
173 void setInstance(ULONG newinstance) { hInstance = newinstance; };
174 HWND getWindowHandle() { return Win32Hwnd; };
175 HWND getOS2WindowHandle() { return OS2Hwnd; };
176 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; };
177
178 Win32WndClass *getWindowClass() { return windowClass; };
179
180 LONG getLastHitTestVal() { return lastHitTestVal; }
181
182 DWORD getWindowContextHelpId() { return contextHelpId; };
183 void setWindowContextHelpId(DWORD id){ contextHelpId = id; };
184
185 BOOL isFrameWindow();
186virtual BOOL isMDIClient();
187virtual BOOL isMDIChild();
188virtual BOOL isDesktopWindow();
189
190 BOOL fHasParentDC() { return fParentDC; };
191
192Win32BaseWindow *getParent();
193 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
194 WNDPROC getWindowProc() { return win32wndproc; };
195 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
196 DWORD getWindowId() { return dwIDMenu; };
197 void setWindowId(DWORD id);
198 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
199 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
200 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
201 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
202 BOOL isChild();
203 PRECT getClientRectPtr() { return &rectClient; };
204 void getClientRect(PRECT rect)
205 {
206 *rect = rectClient;
207 rect->right -= rect->left;
208 rect->bottom -= rect->top;
209 rect->left = rect->top = 0;
210 }
211 void setClientRect(PRECT rect) { rectClient = *rect; };
212 PRECT getWindowRect() { return &rectWindow; };
213 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
214 {
215 rectClient.left = left; rectClient.top = top;
216 rectClient.right = right; rectClient.bottom = bottom;
217 };
218 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
219 {
220 rectWindow.left = left; rectWindow.top = top;
221 rectWindow.right = right; rectWindow.bottom = bottom;
222 };
223 void setWindowRect(PRECT rect) { rectWindow = *rect; };
224 DWORD getFlags() { return flags; };
225 void setFlags(DWORD newflags) { flags = newflags; };
226
227 DWORD getCBExtra() { return cbExtra; };
228 PVOID getExtraPtr() { return pExtra; };
229
230 HMENU GetMenu() { return dwIDMenu; };
231 VOID SetMenu(HMENU newMenu) { dwIDMenu = newMenu; };
232 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
233 HMENU GetSysMenu() { return hSysMenu; }
234
235 HICON IconForWindow(WPARAM fType);
236
237 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
238 HRGN GetWindowRegion() { return hWindowRegion; };
239
240 //Save old clip region for CS_OWNDC windows (in BeginPaint)
241 HRGN GetClipRegion() { return hClipRegion; };
242 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
243
244 BOOL ShowWindow(ULONG nCmdShow);
245 BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags);
246 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
247 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
248 BOOL ScrollWindow(int dx, int dy);
249virtual BOOL DestroyWindow();
250 HWND SetActiveWindow();
251 BOOL DeactivateChildWindow();
252 HWND GetParent();
253 HWND SetParent(HWND hwndNewParent);
254
255 BOOL IsChild(HWND hwndParent);
256
257 HWND GetTopWindow();
258 HWND GetTopParent();
259
260 HWND GetWindow(UINT uCmd);
261 virtual BOOL EnableWindow(BOOL fEnable);
262 BOOL CloseWindow();
263 static HWND GetActiveWindow();
264 //Window handle has already been verified, so just return true
265 BOOL IsWindow() { return TRUE; };
266 BOOL IsDialog() { return fIsDialog; };
267 BOOL IsModalDialog() { return fIsModalDialog; };
268 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
269 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
270 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
271 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
272 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
273 BOOL IsParentChanging() { return fParentChange; };
274 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
275 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
276 BOOL IsWindowIconic();
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!
309Win32WndClass *getClass() { return windowClass; };
310Win32BaseWindow *getOwner() { return owner; };
311 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
312
313 SCROLLBAR_INFO *getScrollInfo(int nBar);
314
315 LRESULT SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
316 LRESULT SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
317static LRESULT BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam);
318static LRESULT BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
319 void CallWindowHookProc(ULONG hooktype, ULONG Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode = FALSE);
320
321 LRESULT DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
322 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
323
324 LRESULT DefWndControlColor(UINT ctlType, HDC hdc);
325 LRESULT DefWndPrint(HDC hdc,ULONG uFlags);
326
327 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
328
329 HWND FindWindowById(int id);
330
331 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow);
332
333 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
334 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
335 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
336
337 HWND getNextDlgGroupItem(HWND hwndCtrl, BOOL fPrevious);
338
339 BOOL isComingToTop() { return fComingToTop; };
340 void setComingToTop(BOOL fTop) { fComingToTop = fTop; };
341 BOOL isInTasklist() { return fTaskList; };
342
343 //window property methods
344 HANDLE getProp(LPCSTR str);
345 BOOL setProp(LPCSTR str, HANDLE handle);
346 HANDLE removeProp(LPCSTR str);
347 INT enumPropsExA(PROPENUMPROCEXA func, LPARAM lParam);
348 INT enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
349
350#ifdef DEBUG
351 LONG addRef();
352 LONG release(char *function = __FUNCTION__, int line = __LINE__ );
353#endif
354
355//Locates window in linked list and increases reference count (if found)
356//Window object must be unreferenced after usage
357static Win32BaseWindow *GetWindowFromHandle(HWND hwnd);
358static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd);
359static Win32BaseWindow *GetWindowFromOS2FrameHandle(HWND hwnd);
360
361 static void DestroyAll();
362
363protected:
364#ifndef OS2_INCLUDED
365 BOOL CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
366#endif
367 LRESULT SendInternalMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
368 LRESULT SendInternalMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
369 void Init();
370
371 void NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
372
373 //called in destructor to remove all (if any) window properties
374 void removeWindowProps();
375 PROPERTY *findWindowProperty(LPCSTR str);
376
377 HWND OS2Hwnd, OS2HwndFrame;
378 HMENU hSysMenu;
379 HWND Win32Hwnd;
380
381 int posx, posy, width, height;
382
383 // values normally contained in the standard window words
384 ULONG dwExStyle; //GWL_EXSTYLE
385 ULONG dwStyle; //GWL_STYLE
386 ULONG dwOldStyle; //Used to determine which frame control buttons to change (OS/2 mode)
387 WNDPROC win32wndproc; //GWL_WNDPROC
388 ULONG hInstance; //GWL_HINSTANCE
389//Moved in ChildWindow class
390///// Win32BaseWindow *parent; //GWL_HWNDPARENT
391 ULONG dwIDMenu; //GWL_ID
392 ULONG userData; //GWL_USERDATA
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 fInternalMsg:1, //Used to distinguish between messages
410 //sent by PM and those sent by apps
411 fParentChange:1,
412 fDestroyWindowCalled:1, //DestroyWindow was called for this window
413 fTaskList:1, //should be listed in PM tasklist or not
414 fXDefault:1,
415 fCXDefault:1,
416 fParentDC:1,
417 fComingToTop:1,
418 isUnicode:1,
419 fMinMaxChange:1, //set when switching between min/max/restored state
420 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
421 fEraseBkgndFlag:1;
422
423 ULONG state;
424 HRGN hWindowRegion;
425 HRGN hClipRegion;
426
427 DWORD dwThreadId; //id of thread that created this window
428 DWORD dwProcessId; //id of process that created this window
429
430 Win32BaseWindow *owner;
431 HICON hIcon,hIconSm;
432
433 char *windowNameA;
434 WCHAR *windowNameW;
435
436 char *userWindowBytes;
437 ULONG nrUserWindowBytes;
438
439 RECT rectWindow; //relative to parent
440 RECT rectClient; //relative to frame
441WINDOWPLACEMENT windowpos;
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 GetInsideRect(RECT *rect);
477 VOID DrawFrame(HDC hdc,RECT *rect,BOOL dlgFrame,BOOL active);
478public:
479 LONG HandleNCHitTest(POINT pt);
480 BOOL GetSysPopupPos(RECT* rect);
481private:
482 BOOL DrawSysButton(HDC hdc,RECT *rect);
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 void SetFakeOpen32() { WinSetDAXData (OS2Hwnd, &fakeWinBase); }
504 void RemoveFakeOpen32() { WinSetDAXData (OS2Hwnd, NULL); }
505
506 fakeOpen32WinBaseClass fakeWinBase;
507
508 VOID AdjustMaximizedRect(LPRECT rect);
509 VOID AdjustTrackInfo(PPOINT minTrackSize,PPOINT maxTrackSize);
510
511 //Temporary hack for CS_CLASSDC style (do the same as for CS_OWNDC)
512#ifndef OS2_INCLUDED
513 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC|CS_CLASSDC)); }
514#else
515 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC_W|CS_CLASSDC_W)); }
516#endif
517
518 HDC getOwnDC() { return ownDC; }
519 void setOwnDC(HDC hdc) { ownDC = hdc; }
520protected:
521 HDC ownDC;
522
523public:
524 VOID setEraseBkgnd (BOOL erase) { fEraseBkgndFlag = erase; }
525 BOOL needsEraseBkgnd() { return fEraseBkgndFlag; }
526};
527
528#endif //__cplusplus
529
530#endif //__WIN32WNDBASE_H__
Note: See TracBrowser for help on using the repository browser.