1 // ResizableMsgSupport.h: some declarations to support custom resizable wnds
\r
3 /////////////////////////////////////////////////////////////////////////////
\r
5 // Copyright (C) 2000-2002 by Paolo Messina
\r
6 // (http://www.geocities.com/ppescher - ppescher@yahoo.com)
\r
8 // The contents of this file are subject to the Artistic License (the "License").
\r
9 // You may not use this file except in compliance with the License.
\r
10 // You may obtain a copy of the License at:
\r
11 // http://www.opensource.org/licenses/artistic-license.html
\r
13 // If you find this code useful, credits would be nice!
\r
15 /////////////////////////////////////////////////////////////////////////////
\r
17 #if !defined(AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_)
\r
18 #define AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_
\r
22 #endif // _MSC_VER > 1000
\r
24 typedef struct tagRESIZEPROPERTIES
\r
26 // wether to ask for resizing properties every time
\r
29 // otherwise, use the cached properties
\r
30 BOOL bCachedLikesClipping;
\r
31 BOOL bCachedNeedsRefresh;
\r
33 // initialize with valid data
\r
34 tagRESIZEPROPERTIES() : bAskClipping(TRUE), bAskRefresh(TRUE) {}
\r
36 } RESIZEPROPERTIES, *PRESIZEPROPERTIES, *LPRESIZEPROPERTIES;
\r
39 typedef struct tagCLIPPINGPROPERTY
\r
41 BOOL bLikesClipping;
\r
43 // initialize with valid data
\r
44 tagCLIPPINGPROPERTY() : bLikesClipping(FALSE) {}
\r
46 } CLIPPINGPROPERTY, *PCLIPPINGPROPERTY, *LPCLIPPINGPROPERTY;
\r
49 typedef struct tagREFRESHPROPERTY
\r
55 // initialize with valid data
\r
56 tagREFRESHPROPERTY() : bNeedsRefresh(TRUE) {}
\r
58 } REFRESHPROPERTY, *PREFRESHPROPERTY, *LPREFRESHPROPERTY;
\r
61 // registered message to communicate with the library
\r
62 extern const UINT WMU_RESIZESUPPORT;
\r
64 // if the message is implemented the returned value must be non-zero
\r
65 // the default window procedure returns zero for unhandled messages
\r
67 // wParam is one of the following RSZSUP_* values, lParam as specified
\r
70 RSZSUP_QUERYPROPERTIES = 101, // lParam = LPRESIZEPROPERTIES
\r
71 RSZSUP_LIKESCLIPPING = 102, // lParam = LPCLIPPINGPROPERTY
\r
72 RSZSUP_NEEDSREFRESH = 103, // lParam = LPREFRESHPROPERTY
\r
73 RSZSUP_SHEETPAGEEXHACK = 104, // lParam = HWND (source prop.page)
\r
76 /////////////////////////////////////////////////////////////////////////////
\r
77 // utility functions
\r
79 inline BOOL Send_QueryProperties(HWND hWnd, LPRESIZEPROPERTIES pResizeProperties)
\r
81 return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
\r
82 RSZSUP_QUERYPROPERTIES, (LPARAM)pResizeProperties));
\r
85 inline BOOL Send_LikesClipping(HWND hWnd, LPCLIPPINGPROPERTY pClippingProperty)
\r
87 return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
\r
88 RSZSUP_LIKESCLIPPING, (LPARAM)pClippingProperty));
\r
91 inline BOOL Send_NeedsRefresh(HWND hWnd, LPREFRESHPROPERTY pRefreshProperty)
\r
93 return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
\r
94 RSZSUP_NEEDSREFRESH, (LPARAM)pRefreshProperty));
\r
97 inline void Post_SheetPageExHack(HWND hWndSheet, HWND hWndPage)
\r
99 PostMessage(hWndSheet, WMU_RESIZESUPPORT,
\r
100 RSZSUP_SHEETPAGEEXHACK, (LPARAM)hWndPage);
\r
103 #endif // !defined(AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_)
\r