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

Last change on this file since 8541 was 8541, checked in by sandervl, 23 years ago

implemented simple drag & drop with WM_DROPFILES

File size: 21.2 KB
Line 
1/* $Id: win32wbase.h,v 1.141 2002-06-01 17:26: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 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 MsgDropFiles(UINT cFiles, POINT point, LPSTR pszFiles, UINT cbszFiles, BOOL fNonClient = FALSE);
163 BOOL AcceptsDropFiles();
164
165 ULONG MsgSetText(LPSTR lpsz, LONG cch);
166 ULONG MsgGetTextLength();
167 void MsgGetText(char *wndtext, ULONG textlength);
168
169virtual LONG SetWindowLong(int index, ULONG value, BOOL fUnicode);
170virtual ULONG GetWindowLong(int index, BOOL fUnicode);
171virtual WORD SetWindowWord(int index, WORD value);
172virtual WORD GetWindowWord(int index);
173
174 DWORD getStyle() { return dwStyle; };
175 DWORD getOldStyle() { return dwOldStyle; };
176 void setStyle(DWORD newstyle) { dwStyle = newstyle; };
177 void setOldStyle(DWORD oldStyle) { dwOldStyle = oldStyle; };
178 DWORD getExStyle() { return dwExStyle; };
179 void setExStyle(DWORD newexstyle) { dwExStyle = newexstyle; };
180 ULONG getInstance() { return hInstance; };
181 void setInstance(ULONG newinstance) { hInstance = newinstance; };
182 HWND getWindowHandle() { return Win32Hwnd; };
183 HWND getOS2WindowHandle() { return OS2Hwnd; };
184 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; };
185 HWND getLastActive() { return hwndLastActive; };
186 void setLastActive(HWND _hwndLastActive)
187 { hwndLastActive = _hwndLastActive; };
188
189 Win32WndClass *getWindowClass() { return windowClass; };
190
191 LONG getLastHitTestVal() { return lastHitTestVal; }
192 void setLastHitTestVal(LONG hittest) { lastHitTestVal = hittest; }
193
194 DWORD getWindowContextHelpId() { return contextHelpId; };
195 void setWindowContextHelpId(DWORD id){ contextHelpId = id; };
196
197 BOOL isFrameWindow();
198virtual BOOL isMDIClient();
199virtual BOOL isMDIChild();
200virtual BOOL isDesktopWindow();
201
202 BOOL fHasParentDC() { return fParentDC; };
203
204Win32BaseWindow *getParent();
205 void setParent(Win32BaseWindow *pwindow) { setParentOfChild((ChildWindow *)pwindow); };
206 WNDPROC getWindowProc() { return win32wndproc; };
207 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; };
208 DWORD getWindowId() { return dwIDMenu; };
209 void setWindowId(DWORD id) { dwIDMenu = id; };
210 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; };
211 ULONG getWindowWidth() { return rectWindow.right - rectWindow.left; };
212 ULONG getClientHeight() { return rectClient.bottom - rectClient.top; };
213 ULONG getClientWidth() { return rectClient.right - rectClient.left; };
214 BOOL isChild();
215 PRECT getClientRectPtr() { return &rectClient; };
216 void getClientRect(PRECT rect)
217 {
218 *rect = rectClient;
219 rect->right -= rect->left;
220 rect->bottom -= rect->top;
221 rect->left = rect->top = 0;
222 }
223 void setClientRect(PRECT rect) { rectClient = *rect; };
224 PRECT getWindowRect() { return &rectWindow; };
225 void setClientRect(LONG left, LONG top, LONG right, LONG bottom)
226 {
227 rectClient.left = left; rectClient.top = top;
228 rectClient.right = right; rectClient.bottom = bottom;
229 };
230 void setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
231 {
232 rectWindow.left = left; rectWindow.top = top;
233 rectWindow.right = right; rectWindow.bottom = bottom;
234 };
235 void setWindowRect(PRECT rect) { rectWindow = *rect; };
236 DWORD getFlags() { return flags; };
237 void setFlags(DWORD newflags) { flags = newflags; };
238
239 DWORD getCBExtra() { return cbExtra; };
240 PVOID getExtraPtr() { return pExtra; };
241
242 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; };
243 HMENU GetSysMenu() { return hSysMenu; }
244
245 HICON IconForWindow(WPARAM fType);
246
247 void SetWindowRegion(HRGN hRegion) { hWindowRegion = hRegion; };
248 HRGN GetWindowRegion() { return hWindowRegion; };
249
250 //Save old clip region for CS_OWNDC windows (in BeginPaint)
251 HRGN GetClipRegion() { return hClipRegion; };
252 void SetClipRegion(HRGN hRegion) { hClipRegion = hRegion; };
253
254 BOOL ShowWindow(ULONG nCmdShow);
255 BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags);
256 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos);
257 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos);
258 BOOL ScrollWindow(int dx, int dy);
259virtual BOOL DestroyWindow();
260 HWND SetActiveWindow();
261 BOOL DeactivateChildWindow();
262 HWND GetParent();
263 HWND SetParent(HWND hwndNewParent);
264
265 BOOL IsChild(HWND hwndParent);
266
267 HWND GetTopWindow();
268 HWND GetTopParent();
269
270 HWND GetWindow(UINT uCmd);
271 virtual BOOL EnableWindow(BOOL fEnable);
272 BOOL CloseWindow();
273 static HWND GetActiveWindow();
274 //Window handle has already been verified, so just return true
275 BOOL IsWindow() { return TRUE; };
276 BOOL IsDialog() { return fIsDialog; };
277 BOOL IsModalDialog() { return fIsModalDialog; };
278 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; };
279 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; };
280 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; };
281 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; };
282 BOOL CanReceiveSizeMsgs() { return state >= STATE_PRE_WMCREATE; };
283 BOOL IsParentChanging() { return fParentChange; };
284 BOOL IsWindowCreated() { return state >= STATE_PRE_WMNCCREATE; }
285 BOOL IsWindowDestroyed() { return state >= STATE_DESTROYED; };
286 BOOL IsWindowIconic();
287 //Window procedure type
288 BOOL IsWindowUnicode();
289 BOOL IsMixMaxStateChanging() { return fMinMaxChange; };
290
291 void SetVisibleRegionChanged(BOOL changed) { fVisibleRegionChanged = changed; };
292 BOOL IsVisibleRegionChanged() { return fVisibleRegionChanged; };
293 BOOL setVisibleRgnNotifyProc(VISRGN_NOTIFY_PROC lpNotifyProc, DWORD dwUserData)
294 {
295 lpVisRgnNotifyProc = lpNotifyProc;
296 dwVisRgnNotifyParam = dwUserData;
297 return TRUE;
298 }
299 void callVisibleRgnNotifyProc(BOOL fDrawingAllowed)
300 {
301 if(lpVisRgnNotifyProc) {
302 lpVisRgnNotifyProc(getWindowHandle(), fDrawingAllowed, dwVisRgnNotifyParam);
303 }
304 }
305 int GetWindowTextLength(BOOL fUnicode);
306 int GetWindowTextLengthA() { return GetWindowTextLength(FALSE); };
307 int GetWindowTextLengthW() { return GetWindowTextLength(TRUE); };
308
309 int GetWindowTextA(LPSTR lpsz, int cch);
310 int GetWindowTextW(LPWSTR lpsz, int cch);
311 BOOL SetWindowTextA(LPSTR lpsz);
312 BOOL SetWindowTextW(LPWSTR lpsz);
313 BOOL hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
314 CHAR *getWindowNamePtrA();
315 WCHAR *getWindowNamePtrW();
316 VOID freeWindowNamePtr(PVOID namePtr);
317 CHAR *getWindowNameA() { return windowNameA; }; //only for MDI windows!
318 WCHAR *getWindowNameW() { return windowNameW; }; //only for MDI windows!
319 int getWindowNameLength() { return windowNameLength; };
320 Win32WndClass *getClass() { return windowClass; };
321 Win32BaseWindow *getOwner() { return owner; };
322 void setOwner(Win32BaseWindow *newOwner) { owner = newOwner; };
323
324
325 DWORD getThreadId() { return dwThreadId; };
326 DWORD getProcessId() { return dwProcessId; };
327
328 SCROLLBAR_INFO *getScrollInfo(int nBar);
329
330 LRESULT DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
331 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
332
333 LRESULT DefWndControlColor(UINT ctlType, HDC hdc);
334 LRESULT DefWndPrint(HDC hdc,ULONG uFlags);
335
336 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam);
337
338 HWND FindWindowById(int id);
339
340 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow);
341
342 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam);
343 BOOL EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam);
344 BOOL EnumWindows(WNDENUMPROC lpfn, LPARAM lParam);
345
346
347 BOOL isComingToTop() { return fComingToTop; };
348 void setComingToTop(BOOL fTop) { fComingToTop = fTop; };
349 BOOL isInTasklist() { return fTaskList; };
350
351 //window property methods
352 HANDLE getProp(LPCSTR str);
353 BOOL setProp(LPCSTR str, HANDLE handle);
354 HANDLE removeProp(LPCSTR str);
355 INT enumPropsExA(PROPENUMPROCEXA func, LPARAM lParam);
356 INT enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
357
358#ifdef DEBUG
359 LONG addRef();
360 LONG release(char *function = __FUNCTION__, int line = __LINE__ );
361#endif
362
363//Locates window in linked list and increases reference count (if found)
364//Window object must be unreferenced after usage
365static Win32BaseWindow *GetWindowFromHandle(HWND hwnd);
366static Win32BaseWindow *GetWindowFromOS2Handle(HWND hwnd);
367static Win32BaseWindow *GetWindowFromOS2FrameHandle(HWND hwnd);
368
369 static void DestroyAll();
370
371protected:
372#ifndef OS2_INCLUDED
373 BOOL CreateWindowExA(CREATESTRUCTA *lpCreateStruct, ATOM classAtom);
374#endif
375 void Init();
376
377 void NotifyFrameChanged(WINDOWPOS *wpos, RECT *oldClientRect);
378
379 //called in destructor to remove all (if any) window properties
380 void removeWindowProps();
381 PROPERTY *findWindowProperty(LPCSTR str);
382
383 HWND OS2Hwnd, OS2HwndFrame;
384 HMENU hSysMenu;
385 HWND Win32Hwnd;
386
387 int posx, posy, width, height;
388
389 // values normally contained in the standard window words
390 ULONG dwExStyle; //GWL_EXSTYLE
391 ULONG dwStyle; //GWL_STYLE
392 ULONG dwOldStyle; //Used to determine which frame control buttons to change (OS/2 mode)
393 WNDPROC win32wndproc; //GWL_WNDPROC
394 ULONG hInstance; //GWL_HINSTANCE
395//Moved in ChildWindow class
396///// Win32BaseWindow *parent; //GWL_HWNDPARENT
397 ULONG dwIDMenu; //GWL_ID
398 ULONG userData; //GWL_USERDATA
399 HWND hwndLastActive; // last active popup handle
400
401 ULONG cbExtra;
402 PVOID pExtra;
403
404 HWND hwndLinkAfter;
405 DWORD flags;
406 DWORD contextHelpId;
407 DWORD hotkey;
408 LONG lastHitTestVal; //Last value returned by WM_NCHITTEST handler
409
410 HWND OS2HwndModalDialog;
411
412 ULONG fFirstShow:1,
413 fIsDialog:1,
414 fIsModalDialog:1,
415 fIsModalDialogOwner:1,
416 fParentChange:1,
417 fDestroyWindowCalled:1, //DestroyWindow was called for this window
418 fTaskList:1, //should be listed in PM tasklist or not
419 fXDefault:1,
420 fCXDefault:1,
421 fParentDC:1,
422 fComingToTop:1,
423 isUnicode:1,
424 fMinMaxChange:1, //set when switching between min/max/restored state
425 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
426 fEraseBkgndFlag:1,
427 fFakeWindow:1;
428
429 ULONG state;
430 HRGN hWindowRegion;
431 HRGN hClipRegion;
432
433 DWORD dwThreadId; //id of thread that created this window
434 DWORD dwProcessId; //id of process that created this window
435
436 Win32BaseWindow *owner;
437 HICON hIcon,hIconSm;
438
439 char *windowNameA;
440 WCHAR *windowNameW;
441 int windowNameLength;
442
443 char *userWindowBytes;
444 ULONG nrUserWindowBytes;
445
446 RECT rectWindow; //relative to parent
447 RECT rectClient; //relative to frame
448WINDOWPLACEMENT windowpos;
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);
488private:
489 BOOL DrawSysButton(HDC hdc,RECT *rect);
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 void SetFakeOpen32() { WinSetDAXData (OS2Hwnd, &fakeWinBase); }
511 void RemoveFakeOpen32() { WinSetDAXData (OS2Hwnd, NULL); }
512
513 fakeOpen32WinBaseClass fakeWinBase;
514
515 VOID AdjustMaximizedRect(LPRECT rect);
516 VOID AdjustTrackInfo(PPOINT minTrackSize,PPOINT maxTrackSize);
517
518 //Temporary hack for CS_CLASSDC style (do the same as for CS_OWNDC)
519#ifndef OS2_INCLUDED
520 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC|CS_CLASSDC)); }
521#else
522 BOOL isOwnDC() { return (windowClass && windowClass->getStyle() & (CS_OWNDC_W|CS_CLASSDC_W)); }
523#endif
524
525 HDC getOwnDC() { return ownDC; }
526 void setOwnDC(HDC hdc) { ownDC = hdc; }
527protected:
528 HDC ownDC;
529
530public:
531 VOID setEraseBkgnd (BOOL erase) { fEraseBkgndFlag = erase; }
532 BOOL needsEraseBkgnd() { return fEraseBkgndFlag; }
533};
534
535#endif //__cplusplus
536
537#endif //__WIN32WNDBASE_H__
Note: See TracBrowser for help on using the repository browser.