-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// ResizableMsgSupport.h: some declarations to support custom resizable wnds | ||
// | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright (C) 2000-2002 by Paolo Messina | ||
// (http://www.geocities.com/ppescher - [email protected]) | ||
// | ||
// The contents of this file are subject to the Artistic License (the "License"). | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at: | ||
// http://www.opensource.org/licenses/artistic-license.html | ||
// | ||
// If you find this code useful, credits would be nice! | ||
// | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
#if !defined(AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_) | ||
#define AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_ | ||
|
||
#if _MSC_VER > 1000 | ||
#pragma once | ||
#endif // _MSC_VER > 1000 | ||
|
||
typedef struct tagRESIZEPROPERTIES | ||
{ | ||
// wether to ask for resizing properties every time | ||
BOOL bAskClipping; | ||
BOOL bAskRefresh; | ||
// otherwise, use the cached properties | ||
BOOL bCachedLikesClipping; | ||
BOOL bCachedNeedsRefresh; | ||
|
||
// initialize with valid data | ||
tagRESIZEPROPERTIES() : bAskClipping(TRUE), bAskRefresh(TRUE) {} | ||
|
||
} RESIZEPROPERTIES, *PRESIZEPROPERTIES, *LPRESIZEPROPERTIES; | ||
|
||
|
||
typedef struct tagCLIPPINGPROPERTY | ||
{ | ||
BOOL bLikesClipping; | ||
|
||
// initialize with valid data | ||
tagCLIPPINGPROPERTY() : bLikesClipping(FALSE) {} | ||
|
||
} CLIPPINGPROPERTY, *PCLIPPINGPROPERTY, *LPCLIPPINGPROPERTY; | ||
|
||
|
||
typedef struct tagREFRESHPROPERTY | ||
{ | ||
BOOL bNeedsRefresh; | ||
RECT rcOld; | ||
RECT rcNew; | ||
|
||
// initialize with valid data | ||
tagREFRESHPROPERTY() : bNeedsRefresh(TRUE) {} | ||
|
||
} REFRESHPROPERTY, *PREFRESHPROPERTY, *LPREFRESHPROPERTY; | ||
|
||
|
||
#endif // !defined(AFX_RESIZABLEMSGSUPPORT_H__INCLUDED_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// ResizableMsgSupport.inl: some definitions to support custom resizable wnds | ||
// | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright (C) 2000-2002 by Paolo Messina | ||
// (http://www.geocities.com/ppescher - [email protected]) | ||
// | ||
// The contents of this file are subject to the Artistic License (the "License"). | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at: | ||
// http://www.opensource.org/licenses/artistic-license.html | ||
// | ||
// If you find this code useful, credits would be nice! | ||
// | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
// registered message to communicate with the library | ||
// (defined so that in the same executable it is initialized only once) | ||
const UINT WMU_RESIZESUPPORT = ::RegisterWindowMessage(_T("WMU_RESIZESUPPORT")); | ||
|
||
// if the message is implemented the returned value must be non-zero | ||
// the default window procedure returns zero for unhandled messages | ||
|
||
// wParam is one of the following RSZSUP_* values, lParam as specified | ||
|
||
#define RSZSUP_QUERYPROPERTIES 101 // lParam = LPRESIZEPROPERTIES | ||
|
||
#define RSZSUP_LIKESCLIPPING 102 // lParam = LPCLIPPINGPROPERTY | ||
|
||
#define RSZSUP_NEEDSREFRESH 103 // lParam = LPREFRESHPROPERTY | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// utility functions | ||
|
||
inline BOOL Send_QueryProperties(HWND hWnd, LPRESIZEPROPERTIES pResizeProperties) | ||
{ | ||
ASSERT(::IsWindow(hWnd)); | ||
return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT, | ||
RSZSUP_QUERYPROPERTIES, (LPARAM)pResizeProperties)); | ||
} | ||
|
||
inline BOOL Send_LikesClipping(HWND hWnd, LPCLIPPINGPROPERTY pClippingProperty) | ||
{ | ||
ASSERT(::IsWindow(hWnd)); | ||
return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT, | ||
RSZSUP_LIKESCLIPPING, (LPARAM)pClippingProperty)); | ||
} | ||
|
||
inline BOOL Send_NeedsRefresh(HWND hWnd, LPREFRESHPROPERTY pRefreshProperty) | ||
{ | ||
ASSERT(::IsWindow(hWnd)); | ||
return (0 != SendMessage(hWnd, WMU_RESIZESUPPORT, | ||
RSZSUP_NEEDSREFRESH, (LPARAM)pRefreshProperty)); | ||
} |