ResizableMsgSupport.inl

00001 // ResizableMsgSupport.inl: some definitions to support custom resizable wnds
00002 //
00004 //
00005 // Copyright (C) 2000-2002 by Paolo Messina
00006 // (http://www.geocities.com/ppescher - [email protected])
00007 //
00008 // The contents of this file are subject to the Artistic License (the "License").
00009 // You may not use this file except in compliance with the License. 
00010 // You may obtain a copy of the License at:
00011 // http://www.opensource.org/licenses/artistic-license.html
00012 //
00013 // If you find this code useful, credits would be nice!
00014 //
00016 
00017 
00018 // registered message to communicate with the library
00019 // (defined so that in the same executable it is initialized only once)
00020 const UINT WMU_RESIZESUPPORT = ::RegisterWindowMessage(_T("WMU_RESIZESUPPORT"));
00021 
00022 // if the message is implemented the returned value must be non-zero
00023 // the default window procedure returns zero for unhandled messages
00024 
00025 // wParam is one of the following RSZSUP_* values, lParam as specified
00026 
00027 #define RSZSUP_QUERYPROPERTIES  101     // lParam = LPRESIZEPROPERTIES
00028 
00029 #define RSZSUP_LIKESCLIPPING    102     // lParam = LPCLIPPINGPROPERTY
00030 
00031 #define RSZSUP_NEEDSREFRESH             103     // lParam = LPREFRESHPROPERTY
00032 
00033 
00035 // utility functions
00036 
00037 inline BOOL Send_QueryProperties(HWND hWnd, LPRESIZEPROPERTIES pResizeProperties)
00038 {
00039         ASSERT(::IsWindow(hWnd));
00040         return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
00041                 RSZSUP_QUERYPROPERTIES, (LPARAM)pResizeProperties));
00042 }
00043 
00044 inline BOOL Send_LikesClipping(HWND hWnd, LPCLIPPINGPROPERTY pClippingProperty)
00045 {
00046         ASSERT(::IsWindow(hWnd));
00047         return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
00048                 RSZSUP_LIKESCLIPPING, (LPARAM)pClippingProperty));
00049 }
00050 
00051 inline BOOL Send_NeedsRefresh(HWND hWnd, LPREFRESHPROPERTY pRefreshProperty)
00052 {
00053         ASSERT(::IsWindow(hWnd));
00054         return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT,
00055                 RSZSUP_NEEDSREFRESH, (LPARAM)pRefreshProperty));
00056 }

Generated on Tue Dec 13 14:47:57 2005 for guliverkli by  doxygen 1.4.5