class CXTPNoFlickerWnd : public TBase
{
public:
/**
* @brief
* Constructs a CXTPNoFlickerWnd object.
*/
CXTPNoFlickerWnd()
{
m_crBack = ::GetSysColor(COLOR_3DFACE);
}
public:
/**
* @brief
* This member function is called to set the background fill
* color for the flicker free control.
* @param crBack An RGB value.
*/
void SetBackColor(COLORREF crBack)
{
m_crBack = crBack;
}
/**
* @brief
* This member function is called to retrieve the background
* fill color for the flicker free control.
* @return
* An RGB value.
*/
COLORREF GetBackColor()
{
return m_crBack;
}
/**
* @brief
* This method provides a CE procedure (WindowProc) for a CWnd
* object. It dispatches messages through the window message
* map. The return value depends on the message.
* @param message Specifies the Windows message to be processed.
* @param wParam Provides additional information used in processing
* the message. The parameter value depends on the
* message.
* @param lParam Provides additional information used in processing
* the message. The parameter value depends on the
* message.
* @return
* An LRESULT object.
*/
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_PAINT:
{
CPaintDC dc(this);
// Get the client rect and paint to a memory device context.
// This will help reduce screen flicker. Pass the memory
// device context to the default window procedure to do
// default painting.
CRect rc;
TBase::GetClientRect(&rc);
CXTPBufferDC memDC(dc.GetSafeHdc(), rc);
memDC.FillSolidRect(rc, m_crBack);
return TBase::DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);
}
case WM_ERASEBKGND: { return TRUE;
}
}
return TBase::WindowProc(message, wParam, lParam);
}
protected:
COLORREF m_crBack; /**< An RGB value. */
};
/** @cond */
_XTP_EXT_CLASS COLORREF AFX_CDECL XTPOfficeBorder_GetBorderColor(bool bTopLeft);
_XTP_EXT_CLASS void AFX_CDECL XTPOfficeBorder_OnPaint(CWnd* pWnd, COLORREF clr1, COLORREF clr2);
/** @endcond */
/**
* @brief
* CXTPOfficeBorder is a template class used for windows that requires
* a thin border. This class can be used as the base class for any
* CWnd derived class to display an Office style, non-client border.
* @param TBase Object class name.
* @param bCalcSize true to remove non-client edge and adjust borders to 1 pixel,
* false to only draw 1 pixel border.
*
* Example:
* Sample code demonstrates how to use the CXTPOfficeBorder template
* class with your base class.
*
* class CTreeCtrlEx : public CXTPOfficeBorder
* {
* ...
* };
*
* Sample code demonstrates how to use the CXTPOfficeBorder template
* class with a member variable.
*
* class CMyView : public CView
* {
* ...
* protected:
* CXTPOfficeBorder m_edit;
* };
*
*/
template
class CXTPOfficeBorder : public TBase
{
protected:
/**
* @brief
* Call this function to return the color used for drawing non-client
* Office style borders for the active current theme.
* @param bTopLeft true to return the top-left border color,
* false to return the bottom-right border color.
* @return
* An RGB color value that represents the non-client border color.
*/
virtual COLORREF GetBorderColor(bool bTopLeft) const
{
return XTPOfficeBorder_GetBorderColor(bTopLeft);
}
/** @cond */
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_NCPAINT:
{
TBase::WindowProc(message, wParam, lParam);
XTPOfficeBorder_OnPaint(this, GetBorderColor(true), GetBorderColor(false));
return 0; // Handled.
}
case WM_CREATE:
{
if (TBase::WindowProc(message, wParam, lParam) == -1)
return -1;
# if (_MSC_VER > 1300)
# pragma warning(push)
# pragma warning(disable : 4127) // conditional expression is constant
# endif
if (bCalcSize)
# if (_MSC_VER > 1300)
# pragma warning(pop)
# endif
{
// remove 3D borders.
long lStyle = ::GetWindowLong(TBase::m_hWnd, GWL_STYLE) & ~WS_BORDER;
::SetWindowLong(TBase::m_hWnd, GWL_STYLE, lStyle);
long lExStyle = ::GetWindowLong(TBase::m_hWnd, GWL_EXSTYLE) & ~WS_EX_CLIENTEDGE;
::SetWindowLong(TBase::m_hWnd, GWL_EXSTYLE, lExStyle);
// force non-client area to be recalculated.
::SetWindowPos(TBase::m_hWnd, NULL, NULL, NULL, NULL, NULL,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE
| SWP_FRAMECHANGED);
}
return 0; // Handled.
}
break;
case WM_NCCALCSIZE: { LRESULT lResult = TBase::WindowProc(message, wParam, lParam);
# if (_MSC_VER > 1300)
# pragma warning(push)
# pragma warning(disable : 4127) // conditional expression is constant
# endif
if (bCalcSize)
# if (_MSC_VER > 1300)
# pragma warning(pop)
# endif
{
NCCALCSIZE_PARAMS FAR* lpncsp = (NCCALCSIZE_PARAMS FAR*)lParam;
// adjust non-client area for border space
lpncsp->rgrc[0].left += 1;
lpncsp->rgrc[0].top += 1;
lpncsp->rgrc[0].right -= 1;
lpncsp->rgrc[0].bottom -= 1;
}
return lResult;
}
}
return TBase::WindowProc(message, wParam, lParam);
}
/** @endcond */
};
/**
* @brief
* Call this function to access CXTPDrawHelpers members.
* Since this class is designed as a single instance object, you can
* only access its members through this method. You cannot
* directly instantiate an object of type CXTPDrawHelpers.
*
* Example:
* BOOL bLowRes = XTPDrawHelpers()->IsLowResolution();
* @return A global draw helper object pointer.
*/
_XTP_EXT_CLASS CXTPDrawHelpers* AFX_CDECL XTPDrawHelpers();
/**
* @brief
* Prepares a printer device context for printing and calculates
* DEVMODE and DEVNAMES values.
* @param ref_hDevMode Reference to a handle of a movable global memory object
* that contains a DEVMODE structure.
* @param ref_hDevNames Reference to a handle of a movable global memory object
* that contains a DEVNAMES structure.
* @return
* Nonzero if successful, otherwise 0.
* @see
* CWinApp::GetPrinterDeviceDefaults, DEVMODE, DEVNAMES
*/
_XTP_EXT_CLASS BOOL AFX_CDECL XTPGetPrinterDeviceDefaults(HGLOBAL& ref_hDevMode,
HGLOBAL& ref_hDevNames);
/**
* @brief
* Helper class which provides currently selected printer information.
*/
class _XTP_EXT_CLASS CXTPPrinterInfo : public CXTPCmdTarget
{
/** @cond */
DECLARE_DYNAMIC(CXTPPrinterInfo)
/** @endcond */
public:
/**
* @brief
* Default object constructor.
* @see
* ~CXTPPrinterInfo
*/
CXTPPrinterInfo();
/**
* @brief
* Default object destructor.
* @see
* CXTPPrinterInfo
*/
virtual ~CXTPPrinterInfo();
/**
* @brief
* This enum defines some printer properties IDs.
* @see
* GetName
*/
enum XTPEnumDeviceName
{
xtpDevName_Driver = 0, /**< Define Driver name property. */
xtpDevName_Device = 1, /**< Define Device name property. */
xtpDevName_Port = 2 /**< Define Port name property. */
};
/**
* @brief
* Call this member function to retrieve the currently selected printer
* Driver name, Device name, or Port name.
* @param eNameID [in] A value from XTPEnumDeviceName enum which specifies
* the property.
* @return
* A string with the requested name.
* @see
* XTPEnumDeviceName
*/
CString GetName(XTPEnumDeviceName eNameID);
protected:
/**
* @brief
* This member function retrieves name offset by name ID.
* @param pDevNames [in] A pointer to a DEVNAMES structure.
* @param eNameID [in] Name ID.
* @return
* Name offset in chars.
* @see
* XTPEnumDeviceName, DEVNAMES
*/
WORD _GetNameOffset(LPDEVNAMES pDevNames, XTPEnumDeviceName eNameID);
# ifdef _XTP_ACTIVEX
/** @cond */
DECLARE_DISPATCH_MAP()
DECLARE_INTERFACE_MAP()
DECLARE_OLETYPELIB_EX(CXTPPrinterInfo);
afx_msg BSTR OleGetDeviceName();
afx_msg BSTR OleGetDriverName();
afx_msg BSTR OleGetPortName();
/** @endcond */
# endif
};
/**
* @brief
* This class is used to define a printed page header or footer.
* Also some calculation and drawing functionalities are provided.
* Used as a member of printing options.
* @see
* CXTPPrintOptions
*/
class _XTP_EXT_CLASS CXTPPrintPageHeaderFooter : public CXTPCmdTarget
{
/** @cond */
friend class CXTPPrintOptions;
DECLARE_DYNAMIC(CXTPPrintPageHeaderFooter)
/** @endcond */
public:
/**
* @brief
* Object constructor.
* @param pOwner A pointer to the owner object.
* @param bHeader TRUE if the object represents a header,
* FALSE if the object represents a footer.
* @see
* CXTPPrintOptions
*/
CXTPPrintPageHeaderFooter(CXTPPrintOptions* pOwner, BOOL bHeader);
/**
* @brief
* Default object destructor.
* @see
* CXTPPrintPageHeaderFooter
*/
virtual ~CXTPPrintPageHeaderFooter();
/**
* @brief
* Call this member function to format a header or footer using
* the format string specified in the m_strFormatString member.
* The formatted text is copied into the following members:
* m_strLeft, m_strCenter, m_strRight.
* If m_strFormatString is empty, then this function does nothing.
* @param pInfo [in] Printing context.
* @param pcszWndTitle [in] Pointer to window title (for &w format string specifier).
* @param nVirtualPage int number of page (e.g. in horizontal direction for wide data)
* @details
* FormatTexts should be called before Draw call. Format specifiers
* are the same as in Internet Explorer:
*
* &d: Date in short format (as specified by Regional Settings
* in Control Panel).
* &D: Date in long format (as specified by Regional Settings
* in Control Panel).
*
* &t: Time in the format specified by Regional Settings in Control Panel.
* &T: Time in 24-hour format.
*
* &p: Current page number.
* &P: Total number of pages.
*
* &b: The text immediately following these characters as centered.
* &b&b: The text immediately following the first "&b" as centered, and
* the text following the second "&b" as right-justified.
*
* &w: Window title.
*
* &&: A single ampersand (&).
* \\n: New line marker.
*
* @see
* m_strFormatString, m_strLeft, m_strCenter, m_strRight
*/
virtual void FormatTexts(CPrintInfo* pInfo, LPCTSTR pcszWndTitle, int nVirtualPage = 0);
/**
* @brief
* Call this member function to draw a header or footer on the device context.
* @param pDC [in] A pointer to a device context.
* @param rcRect [in, out] A reference to a bounding rectangle.
* After the function call, this member contains a rect
* necessary to draw a header or footer. A header
* is aligned to the top of the passed bounding rectangle,
* while a footer is aligned to the bottom.
* @param bCalculateOnly TRUE to calculate the rectangle without drawing.
* @see
* FormatTexts, m_strLeft, m_strCenter, m_strRight
*/
virtual void Draw(CDC* pDC, CRect& rcRect, BOOL bCalculateOnly = FALSE);
/**
* @brief
* Call this member function to copy members from a specified source object.
* @param pSrc A pointer to the source object to copy data from.
* @see
* Clear
*/
virtual void Set(const CXTPPrintPageHeaderFooter* pSrc);
/**
* @brief
* Call this member function to clear all members' values.
* @see
* Set
*/
virtual void Clear();
/**
* @brief
* Checks if all strings are empty.
* @return
* TRUE if all strings are empty.
*/
virtual BOOL IsEmpty();
LOGFONT m_lfFont; /**< Font details. */
COLORREF m_clrColor; /**< Text color. */
CString m_strFormatString; /**< Text as Format string. */
CString m_strLeft; /**< A string to show with left align. */
CString m_strCenter; /**< A string to show with center align. */
CString m_strRight; /**< A string to show with right align. */
/** @cond */
static CString AFX_CDECL GetParentFrameTitle(CWnd* pWnd);
static void AFX_CDECL DoInsertHFFormatSpecifierViaMenu(CWnd* pParent, CEdit* pEdit,
CButton* pButton);
/** @endcond */
protected:
BOOL m_bHeader; /**< If TRUE, the object represents a Header. Otherwise footer. */
CXTPPrintOptions* m_pOwner; /**< Store pointer to owner object. */
/** @cond */
virtual int Calc3ColSizes(CDC* pDC, int nW, const CString& str1, const CString& str2,
const CString& str3, CSize& rsz1, CSize& rsz2, CSize& rsz3);
virtual int _Calc3ColSizesIfSingleCol(CDC* pDC, int nW, const CString& str1,
const CString& str2, const CString& str3, CSize& rsz1,
CSize& rsz2, CSize& rsz3);
virtual void _SplitFormatLCR(CString strFormat);
virtual void _FormatDateTime(CString& strFormat, LCID lcidLocale);
/** @endcond */
# ifdef _XTP_ACTIVEX
/** @cond */
afx_msg LPFONTDISP OleGetFont();
afx_msg void OleSetFont(LPFONTDISP pFontDisp);
afx_msg void OleClear();
DECLARE_DISPATCH_MAP()
DECLARE_INTERFACE_MAP()
DECLARE_OLETYPELIB_EX(CXTPPrintPageHeaderFooter);
/** @endcond */
# endif
private:
int fnYi(int Xi, int Wi);
};
/**
* @brief
* Obtains a native handle of a specified object.
* @param pDC Pointer to a device context.
* @return
* A native handle value.
*/
AFX_INLINE HDC XTPGetHandle(CDC* pDC)
{
_ASSERTE(NULL != pDC);
return pDC->m_hDC;
}
/**
* @brief
* Obtains a native handle of a specified object.
* @param dc Reference to a device context.
* @return
* A native handle value.
*/
AFX_INLINE HDC XTPGetHandle(CDC& dc)
{
return dc.m_hDC;
}
/**
* @brief
* Obtains a native handle of a specified object.
* @param hDC Handle to a device context.
* @return
* A native handle value.
*/
AFX_INLINE HDC XTPGetHandle(HDC hDC)
{
return hDC;
}
/**
* @brief
* Specifies process DPI awareness level. Refer to platform SDK
* documentation for its analogue called PROCESS_DPI_AWARENESS.
*/
enum XTPDpiAwareness
{
xtpDpiUnaware = 0, /**< Same as PROCESS_DPI_AWARENESS::PROCESS_DPI_UNAWARE. */
xtpDpiSystemAware = 1, /**< Same as PROCESS_DPI_AWARENESS::PROCESS_SYSTEM_DPI_AWARE. */
xtpDpiPerMonitorAware = 2 /**< Same as PROCESS_DPI_AWARENESS::PROCESS_PER_MONITOR_DPI_AWARE. */
};
/**
* @brief
* This helper class is used in drawing when DPI is different than 96.
* @details
* relative pixel = 1 pixel at 96 DPI and scaled based on actual DPI.
*
* Original code comes from:
* http://msdn.microsoft.com/en-us/library/windows/desktop/dd464660(v=vs.85).aspx
*/
class _XTP_EXT_CLASS CXTPDpi
{
friend class CXTPSingleton;
public:
enum
{
DefaultDpi = 96 // Normal DPI.
};
/**
* @brief
* Constructs a DPI helper object that works with global DPI settings.
*/
CXTPDpi();
/**
* @brief
* Constructs a DPI helper object that works with the
* provided device context's settings.
* @param hDC Device context with DPI settings to be used.
*/
CXTPDpi(HDC hDC);
/**
* @brief
* Constructs a DPI helper object that works with the
* provided window's device context's settings.
* @param hWnd Window handle with DPI settings to be used.
*/
CXTPDpi(HWND hWnd);
/**
* @brief
* Handles object destruction.
*/
~CXTPDpi();
/**
* @brief
* Sets process DPI awareness level. Whenever possible, prefer setting
* DPI awareness level in the application's manifest file. Refer to
* platform SDK's documentation for SetProcessDpiAwareness and
* SetProcessDpiAware details and supported OS versions.
* @param dpiAwareness DPI awareness level that is to be set only if
* it is supported by the OS.
* @return
* TRUE if successful.
*/
BOOL SetDpiAwareness(XTPDpiAwareness dpiAwareness);
/**
* @brief
* Obtains process DPI awareness level if possible. Refer to platform
* SDK's documentation for GetProcessDpiAwareness details
* and supported OS versions.
* @return
* DPI awareness level enabled for the calling process.
*/
XTPDpiAwareness GetDpiAwareness() const;
/**
* @brief
* Processes a DPI related message. Must not be called for DPI helper
* objects specific to a device context or window handle.
* @param hWnd Window handle.
* @param message Message code.
* @param wParam Message argument.
* @param lParam Message argument.
* @param pResult Pointer to the result of message processing.
* @return
* TRUE if the message has been processed.
*/
BOOL OnWndMsg(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
/**
* @brief
* Obtains horizontal DPI values for the system, device
* context, or window handle.
* @return
* DPI values.
*/
int GetDPIX() const;
/**
* @brief
* Obtains vertical DPI values for the system, device
* context, or window handle.
* @return
* DPI values.
*/
int GetDPIY() const;
/**
* @brief
* Determines if system, device context, or window handle DPI settings are default.
* @return
* TRUE if DPI setting are default for the target context.
*/
BOOL IsDefaultDpiX() const;
/**
* @brief
* Determines if system, device context, or window handle DPI settings are default.
* @return
* TRUE if DPI setting are default for the target context.
*/
BOOL IsDefaultDpiY() const;
/**
* @brief
* Determines if system, device context, or window handle DPI settings are default.
* @return
* TRUE if DPI setting are default for the target context.
*/
BOOL IsDefaultDpi() const;
/**
* @brief
* Gets global global DPI bitmap scaling flag for the current process.
* The controls can use this value as a default value for a control specific
* DPI bitmap flag flag.
* @return
* The current value of the bitmap scaling flag.
*/
BOOL IsDpiBitmapScalingEnabled() const;
/**
* @brief
* Sets global global DPI bitmap scaling flag for the current process.
* The controls can use this value as a default value for a control specific
* DPI bitmap flag flag.
* @param bEnable TRUE to enable bitmaps scaling, FALSE to disable.
*/
void EnableDpiBitmapScaling(BOOL bEnable = TRUE);
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int ScaleX(int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int ScaleY(int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long ScaleX(long x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long ScaleY(long y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float ScaleX(float x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float ScaleY(float y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double ScaleX(double x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double ScaleY(double y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int ScaleX(unsigned int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int ScaleY(unsigned int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int UnscaleX(int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int UnscaleY(int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long UnscaleX(long x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long UnscaleY(long y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float UnscaleX(float x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float UnscaleY(float y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double UnscaleX(double x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double UnscaleY(double y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int UnscaleX(unsigned int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int UnscaleY(unsigned int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int ScaleX(HDC hDC, int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int ScaleY(HDC hDC, int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long ScaleX(HDC hDC, long x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long ScaleY(HDC hDC, long y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float ScaleX(HDC hDC, float x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float ScaleY(HDC hDC, float y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double ScaleX(HDC hDC, double x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double ScaleY(HDC hDC, double y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int ScaleX(HDC hDC, unsigned int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int ScaleY(HDC hDC, unsigned int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int UnscaleX(HDC hDC, int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
int UnscaleY(HDC hDC, int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long UnscaleX(HDC hDC, long x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
long UnscaleY(HDC hDC, long y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float UnscaleX(HDC hDC, float x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
float UnscaleY(HDC hDC, float y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double UnscaleX(HDC hDC, double x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
double UnscaleY(HDC hDC, double y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param x X-coordinate to scale/unscale using current horizontal DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int UnscaleX(HDC hDC, unsigned int x, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param y Y-coordinate to scale/unscale using current vertical DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
unsigned int UnscaleY(HDC hDC, unsigned int y, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleRect(RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT ScaleRect(const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleRect(RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT UnscaleRect(const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT Scale(const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT Unscale(const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleRect(CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect ScaleRect(const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleRect(CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect UnscaleRect(const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect Scale(const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect Unscale(const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleRect(HDC hDC, RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT ScaleRect(HDC hDC, const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleRect(HDC hDC, RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT UnscaleRect(HDC hDC, const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT Scale(HDC hDC, const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, RECT* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
RECT Unscale(HDC hDC, const RECT& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleRect(HDC hDC, CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect ScaleRect(HDC hDC, const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleRect(HDC hDC, CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect UnscaleRect(HDC hDC, const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect Scale(HDC hDC, const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pRect A pointer to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, CRect* pRect, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param rc A reference to a rectangle object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CRect Unscale(HDC hDC, const CRect& rc, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScalePoint(POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT ScalePoint(const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscalePoint(POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT UnscalePoint(const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT Scale(const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT Unscale(const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScalePoint(CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint ScalePoint(const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscalePoint(CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint UnscalePoint(const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint Scale(const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint Unscale(const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScalePoint(HDC hDC, POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT ScalePoint(HDC hDC, const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscalePoint(HDC hDC, POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT UnscalePoint(HDC hDC, const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT Scale(HDC hDC, const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, POINT* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
POINT Unscale(HDC hDC, const POINT& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScalePoint(HDC hDC, CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint ScalePoint(HDC hDC, const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscalePoint(HDC hDC, CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint UnscalePoint(HDC hDC, const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint Scale(HDC hDC, const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pPoint A pointer to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, CPoint* pPoint, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pt A reference to a point object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CPoint Unscale(HDC hDC, const CPoint& pt, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleSize(SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE ScaleSize(const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleSize(SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE UnscaleSize(const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE Scale(const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE Unscale(const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleSize(CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize ScaleSize(const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleSize(CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize UnscaleSize(const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize Scale(const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize Unscale(const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleSize(HDC hDC, SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE ScaleSize(HDC hDC, const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleSize(HDC hDC, SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE UnscaleSize(HDC hDC, const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE Scale(HDC hDC, const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, SIZE* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
SIZE Unscale(HDC hDC, const SIZE& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void ScaleSize(HDC hDC, CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize ScaleSize(HDC hDC, const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void UnscaleSize(HDC hDC, CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize UnscaleSize(HDC hDC, const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Scale(HDC hDC, CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize Scale(HDC hDC, const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param pSize A pointer to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
*/
void Unscale(HDC hDC, CSize* pSize, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Perform scalling/unscalling of X, Y coordinates, rectangle,
* size, and point objects according to active DPI settings.
* @param hDC Handle to a device context.
* @param sz A reference to a size object to scale/unscale using current DPI settings.
* @param iDpiScaleAbove Scaled only if current DPI is larger than specified.
* @return
* Scaled/unscaled value.
*/
CSize Unscale(HDC hDC, const CSize& sz, int iDpiScaleAbove = CXTPDpi::DefaultDpi) const;
/**
* @brief
* Selects one of the provided values that is specific to the current screen DPI.
* @param upToDpi120 The value that is selected if the current DPI is in range [96-120).
* @param upToDpi144 The value that is selected if the current DPI is in range [120-144).
* @param upToDpi192 The value that is selected if the current DPI is in range [144-192).
* @param theLargest The value that is selected if the current DPI is in range [192-*).
* @return
* An interger representing the scaled screen size according to active DPI settings.
*/
int SelectDpiSpecific(int upToDpi120, int upToDpi144, int upToDpi192, int theLargest) const;
/**
* @brief
* Selects one of the provided values that is specific to the current screen DPI.
* @param upToDpi120 The value that is selected if the current DPI is in range [96-120).
* @param upToDpi144 The value that is selected if the current DPI is in range [120-144).
* @param upToDpi192 The value that is selected if the current DPI is in range [144-192).
* @param theLargest The value that is selected if the current DPI is in range [192-*).
* @return
* A LPCTSTR value representing the scaled screen size according to active DPI settings.
*/
LPCTSTR SelectDpiSpecific(LPCTSTR upToDpi120, LPCTSTR upToDpi144, LPCTSTR upToDpi192,
LPCTSTR theLargest) const;
/**
* @brief
* Selects one of the provided values that is specific to the current screen DPI.
* @param upToDpi120 The value that is selected if the current DPI is in range [96-120).
* @param upToDpi144 The value that is selected if the current DPI is in range [120-144).
* @param upToDpi192 The value that is selected if the current DPI is in range [144-192).
* @param theLargest The value that is selected if the current DPI is in range [192-*).
* @return
*/
void* SelectDpiSpecific(void* upToDpi120, void* upToDpi144, void* upToDpi192,
void* theLargest) const;
/**
* @brief
* Scale screen width according to active DPI settings.
* @return
* Scaled screen size according to active DPI settings.
*/
int ScaledScreenWidth() const;
/**
* @brief
* Scale screen height according to active DPI settings.
* @return
* Scaled screen size according to active DPI settings.
*/
int ScaledScreenHeight() const;
/**
* @brief
* Determines if screen resolution meets minimum requirements in relative pixels.
* @param cxMin A minimum acceptable width in pixels.
* @param cyMin A minimum acceptable height in pixels.
* @return
* TRUE if screen resolution meets minimum requirements in relative pixels.
*/
bool IsResolutionAtLeast(int cxMin, int cyMin) const;
/**
* @brief
* Convert a point size (1/72 of an inch) to raw pixels.
* @param pt A point value to convert.
* @return
* Converted point size.
*/
int PointsToPixels(int pt) const;
/**
* @brief
* Invalidates any cached metrics.
*/
void Invalidate();
/**
* @brief
* Tries to obtain physical scaling factors for a window regardless of window
* or process DPI awareness.
* @param hWnd Windows handle for which physical scaling factors are to be obtained.
* @param xScale Gets set to the horizontal physical scaling factor
* upon successful completion.
* @param yScale Gets set to the vertical physical scaling factor
* upon successful completion.
* @return
* TRUE if the physical scaling factors are obtained successfully.
*/
BOOL GetPhysicalWindowScaleFactors(HWND hWnd, double& xScale, double& yScale) const;
private:
void Construct(HDC hDC = NULL, HWND hWnd = NULL);
void Init(int dpiX = 0, int dpiY = 0, BOOL bUpdate = FALSE);
void InitDpiAwareness();
int ScaleSystemMetricX(int nIndex) const;
int ScaleSystemMetricY(int nIndex) const;
LRESULT OnWmCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
LRESULT OnWmDpiChanged(HWND hWnd, WPARAM wParam, LPARAM lParam);
private:
enum
{
DpiValueCount = 0x100
};
BOOL m_bInitialized;
BOOL m_bSupportsDpiChange;
HDC m_hDC;
HWND m_hWnd;
BOOL m_bReleaseDC;
BOOL m_bDpiBitmapScaling;
int m_dpiX;
int m_dpiY;
POINT m_nPositiveDpiValues[DpiValueCount + 1];
POINT m_nNegativeDpiValues[DpiValueCount + 1];
static BOOL m_bDpiAwarenessInitialized;
typedef HRESULT(WINAPI* PFNSetProcessDpiAwareness)(XTPDpiAwareness dpiAwareness);
typedef HRESULT(WINAPI* PFNGetProcessDpiAwareness)(HANDLE hProcess,
XTPDpiAwareness* dpiAwareness);
static PFNSetProcessDpiAwareness m_pfnSetProcessDpiAwareness;
static PFNGetProcessDpiAwareness m_pfnGetProcessDpiAwareness;
typedef BOOL(WINAPI* PFNSetProcessDPIAware)();
static PFNSetProcessDPIAware m_pfnSetProcessDPIAware;
static BOOL m_bSetProcessDPIAwareResult;
typedef HANDLE(WINAPI* PFNMonitorFromWindow)(HWND hWnd, DWORD dwFlags);
static PFNMonitorFromWindow m_pfnMonitorFromWindow;
enum MonitorDpiType
{
xtpEffectiveDpiType = 0, // Same as MONITOR_DPI_TYPE::MDT_EFFECTIVE_DPI.
xtpAngularDpiType = 1, // Same as MONITOR_DPI_TYPE::MDT_ANGULAR_DPI.
xtpRawDpiType = 2, // Same as MONITOR_DPI_TYPE::MDT_RAW_DPI.
xtpDefaultDpiType = xtpEffectiveDpiType // Same as MONITOR_DPI_TYPE::MDT_DEFAULT.
};
typedef HRESULT(WINAPI* PFNGetDpiForMonitor)(HANDLE hMonitor, MonitorDpiType dpiType,
UINT* dpiX, UINT* dpiY);
static PFNGetDpiForMonitor m_pfnGetDpiForMonitor;
};
AFX_INLINE BOOL CXTPDpi::IsDpiBitmapScalingEnabled() const
{
return m_bDpiBitmapScaling;
}
AFX_INLINE void CXTPDpi::EnableDpiBitmapScaling(BOOL bEnable /*= TRUE*/)
{
m_bDpiBitmapScaling = bEnable;
}
/**
* @brief
* Provides access to a global DPI helper object instance.
* @return
* A pointer to a global DPI helper object instance.
*/
_XTP_EXT_CLASS CXTPDpi* AFX_CDECL XTPDpiHelper();
/**
* @brief
* Helper macros for scaling of x- and y- coordinates, rectangle,
* size, and point objects according to active DPI settings.
*/
# define XTP_DPI_X(n) XTPDpiHelper()->ScaleX(n) /**< @see XTP_DPI_X */
# define XTP_DPI_Y(n) XTPDpiHelper()->ScaleY(n) /**< @see XTP_DPI_X */
# define XTP_DPI(what) XTPDpiHelper()->Scale(what) /**< @see XTP_DPI_X */
# define XTP_DPI_RECT(rc) XTP_DPI(rc) /**< @see XTP_DPI_X */
# define XTP_DPI_POINT(pt) XTP_DPI(pt) /**< @see XTP_DPI_X */
# define XTP_DPI_SIZE(sz) XTP_DPI(sz) /**< @see XTP_DPI_X */
# define XTP_DC_DPI_X(dc, n) \
XTPDpiHelper()->ScaleX(XTPGetHandle(dc), n) /**< @see XTP_DPI_X \ \ \ \
*/
# define XTP_DC_DPI_Y(dc, n) \
XTPDpiHelper()->ScaleY(XTPGetHandle(dc), n) /**< @see XTP_DPI_X \ \ \ \
*/
# define XTP_DC_DPI(dc, what) \
XTPDpiHelper()->Scale(XTPGetHandle(dc), what) /**< @see XTP_DPI_X */
# define XTP_DC_DPI_RECT(dc, rc) XTP_DC_DPI(dc, rc) /**< @see XTP_DPI_X */
# define XTP_DC_DPI_POINT(dc, pt) XTP_DC_DPI(dc, pt) /**< @see XTP_DPI_X */
# define XTP_DC_DPI_SIZE(dc, sz) XTP_DC_DPI(dc, sz) /**< @see XTP_DPI_X */
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::UnscaleX
*/
# define XTP_UNDPI_X(n) XTPDpiHelper()->UnscaleX(n)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::UnscaleY
*/
# define XTP_UNDPI_Y(n) XTPDpiHelper()->UnscaleY(n)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_UNDPI(what) XTPDpiHelper()->Unscale(what)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_UNDPI_RECT(rc) XTP_UNDPI(rc)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_UNDPI_POINT(pt) XTP_UNDPI(pt)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_UNDPI_SIZE(sz) XTP_UNDPI(sz)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::UnscaleX
*/
# define XTP_DC_UNDPI_X(dc, n) XTPDpiHelper()->UnscaleX(XTPGetHandle(dc), n)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::UnscaleY
*/
# define XTP_DC_UNDPI_Y(dc, n) XTPDpiHelper()->UnscaleY(XTPGetHandle(dc), n)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_DC_UNDPI(dc, what) XTPDpiHelper()->Unscale(XTPGetHandle(dc), what)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_DC_UNDPI_RECT(dc, rc) XTP_DC_UNDPI(dc, rc)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_DC_UNDPI_POINT(dc, pt) XTP_DC_UNDPI(dc, pt)
/**
* @brief
* Macro used for unscaling coordinates according to active DPI settings.
* @see CXTPDpi::Unscale
*/
# define XTP_DC_UNDPI_SIZE(dc, sz) XTP_DC_UNDPI(dc, sz)
/**
* @brief
* Identifies supported primitive symbols rendered from internal primitive font.
*/
XTP_DECLARE_ENUM(XTPPrimitiveSymbol){
xtpPrimitiveSymbolInvalid = -1, xtpPrimitiveSymbolFirst = 0x41,
// Common glyphs.
xtpPrimitiveSymbolMinimize = xtpPrimitiveSymbolFirst, xtpPrimitiveSymbolMaximize,
xtpPrimitiveSymbolRestore, xtpPrimitiveSymbolQuestionMark, xtpPrimitiveSymbolClose,
xtpPrimitiveSymbolHome, xtpPrimitiveSymbolCheckMark, xtpPrimitiveSymbolCheckMarkRTL,
xtpPrimitiveSymbolRadioMark,
// Normal Play glyph.
xtpPrimitiveSymbolPlayLeft, xtpPrimitiveSymbolPlayRight, xtpPrimitiveSymbolPlayUp,
xtpPrimitiveSymbolPlayDown,
// Small Play glyph.
xtpPrimitiveSymbolPlayLeft2, xtpPrimitiveSymbolPlayRight2, xtpPrimitiveSymbolPlayUp2,
xtpPrimitiveSymbolPlayDown2,
// Rewind glyph.
xtpPrimitiveSymbolRewindLeft, xtpPrimitiveSymbolRewindRight, xtpPrimitiveSymbolRewindUp,
xtpPrimitiveSymbolRewindDown,
// Shift glyph.
xtpPrimitiveSymbolShiftLeft = 0x61, xtpPrimitiveSymbolShiftRight, xtpPrimitiveSymbolShiftDown,
xtpPrimitiveSymbolShiftUp,
// Eject glyph.
xtpPrimitiveSymbolEjectLeft, xtpPrimitiveSymbolEjectRight, xtpPrimitiveSymbolEjectUp,
xtpPrimitiveSymbolEjectDown,
// Inject glyph.
xtpPrimitiveSymbolInjectLeft, xtpPrimitiveSymbolInjectRight, xtpPrimitiveSymbolInjectUp,
xtpPrimitiveSymbolInjectDown,
// Pin glyph.
xtpPrimitiveSymbolPinLeft, xtpPrimitiveSymbolPinRight, xtpPrimitiveSymbolPinDown,
xtpPrimitiveSymbolPlus, xtpPrimitiveSymbolMinus, xtpPrimitiveSymbolEllipsis,
xtpPrimitiveSymbolTabClose, xtpPrimitiveSymbolTabPlayLeft, xtpPrimitiveSymbolTabPlayRight,
xtpPrimitiveSymbolTabPlayLeftDisabled, xtpPrimitiveSymbolTabPlayRightDisabled,
xtpPrimitiveSymbolTabPlayUp, xtpPrimitiveSymbolTabPlayDown, xtpPrimitiveSymbolTabPlayUpDisabled,
xtpPrimitiveSymbolTabPlayDownDisabled,
xtpPrimitiveSymbolLast = xtpPrimitiveSymbolTabPlayDownDisabled
};
/**
* @brief
* Provides tools for drawing predefined primitives.
*/
class _XTP_EXT_CLASS CXTPPrimitiveDrawer
{
friend class CXTPSingleton;
CXTPPrimitiveDrawer();
~CXTPPrimitiveDrawer();
public:
/**
* @brief
* Draws a known primitive symbol.
* @param pDC Target device context pointer.
* @param nSymbol Primitive symbol identifier.
* @param rc Target rectangle.
* @param crForeColor Foreground color value, or COLORREF_NULL if left unchanged.
* @param crBackColor Background color value, or COLORREF_NULL if left unchanged.
* @param bOutline TRUE to draw an outline.
* @param hOutlinePen Handle of the PEN to use.
*/
void DrawSymbol(CDC* pDC, XTPPrimitiveSymbol nSymbol, const CRect& rc,
COLORREF crForeColor = COLORREF_NULL, COLORREF crBackColor = COLORREF_NULL,
BOOL bOutline = FALSE, HPEN hOutlinePen = NULL);
private:
int PrimitiveSymbolToSVG(XTPPrimitiveSymbol nSymbol);
BOOL SVGInit(XTPPrimitiveSymbol nSymbol);
BOOL SVGLoad(CString& svg, UINT nIDResource);
BOOL SVGSetColor(CDC* pDC, XTPPrimitiveSymbol nSymbol, COLORREF crForeColor = COLORREF_NULL);
BOOL SVGDraw(CDC* pDC, const CRect& rc, XTPPrimitiveSymbol nSymbol,
COLORREF crForeColor = COLORREF_NULL);
private:
struct SymbolColor
{
CMap m_map;
};
struct SymbolData
{
~SymbolData();
CString svg;
CMap m_mapImage;
};
CMap m_map;
CRITICAL_SECTION m_mapAccess;
};
/**
* @brief
* Provides access to a global primitive drawer instance.
* @return A global primitive drawer object pointer.
* @see
* CXTPPrimitiveDrawer
*/
_XTP_EXT_CLASS CXTPPrimitiveDrawer* AFX_CDECL XTPPrimitiveDrawer();
/**
* @brief
* This class is used as a base class to store printing options.
* It contains base properties and operations for printing tasks.
* @see
* CXTPPrintPageHeaderFooter
*/
class _XTP_EXT_CLASS CXTPPrintOptions : public CXTPCmdTarget
{
/** @cond */
DECLARE_DYNAMIC(CXTPPrintOptions)
/** @endcond */
public:
/**
* @brief
* Default Object constructor.
*/
CXTPPrintOptions();
/**
* @brief
* Default Object destructor.
*/
virtual ~CXTPPrintOptions();
CRect m_rcMargins; /**< Margins (mm*100 or inches*1000). */
BOOL m_bBlackWhitePrinting; /**< Store printing mode: Color or Black&White. */
int m_nBlackWhiteContrast; /**< Black&White printing contrast: 0 ... 255. (default value is 0).
*/
/**
* @brief
* Retrieves page header properties.
* @return
* Page header properties.
* @see
* GetPageFooter
*/
CXTPPrintPageHeaderFooter* GetPageHeader();
/**
* @brief
* Retrieves page footer properties.
* @return
* Page footer properties.
* @see
* GetPageHeader
*/
CXTPPrintPageHeaderFooter* GetPageFooter();
/**
* @brief
* Call this member function to copy members from a specified source object.
* @param pSrc A pointer to a source object to copy data from.
*/
void Set(const CXTPPrintOptions* pSrc);
/**
* @brief
* Call this member function to determine if margines are measured
* in inches or millimeters (mm*100 or inches*1000).
* @return
* TRUE if margins are measured in inches, otherwise FALSE.
* @see
* m_rcMargins, GetMarginsHimetric, GetMarginsLP
*/
virtual BOOL IsMarginsMeasureInches();
/**
* @brief
* Call this member function to get margins in Himetric units.
* @return
* Margins in Himetric units.
* @see
* m_rcMargins, GetMarginsLP
*/
virtual CRect GetMarginsHimetric();
/**
* @brief
* Call this member function to get margins in Logical points.
* @param pDC [in] A pointer to a device context.
* @return
* Margins in Logical points.
* @see
* m_rcMargins, GetMarginsHimetric
*/
virtual CRect GetMarginsLP(CDC* pDC);
/**
* @brief
* Override this member function in a derived class to retrieve
* the active locale ID.
* @return
* Locale ID. Base implementation returns LOCALE_USER_DEFAULT.
*/
virtual LCID GetActiveLCID();
protected:
CXTPPrintPageHeaderFooter* m_pPageHeader; /**< Page header properties. */
CXTPPrintPageHeaderFooter* m_pPageFooter; /**< Page footer properties. */
# ifdef _XTP_ACTIVEX
/** @cond */
DECLARE_DISPATCH_MAP()
afx_msg BOOL OleGetMarginsMeasureMetrics();
afx_msg BOOL OleGetLandscape();
afx_msg void OleSetLandscape(BOOL bLandscape);
afx_msg LPDISPATCH OleGetHeader();
afx_msg LPDISPATCH OleGetFooter();
afx_msg LPDISPATCH OleGetPrinterInfo();
/** @endcond */
# endif
};
/** @cond */
/////////////////////////////////////////////////////////////////////////////
_XTP_EXT_CLASS BOOL CALLBACK _XTPAbortProc(HDC, int);
// Printing Dialog
class _XTP_EXT_CLASS CXTPPrintingDialog : public CDialog
{
public:
enum
{
IDD = AFX_IDD_PRINTDLG
};
CXTPPrintingDialog(CWnd* pParent);
virtual ~CXTPPrintingDialog()
{
}
virtual BOOL OnInitDialog();
virtual void OnCancel();
};
/** @endcond */
/////////////////////////////////////////////////////////////////////////////
AFX_INLINE BOOL CXTPDrawHelpers::IsFastFillAvailable() const
{
return m_pfnFastGradientFill != NULL;
}
AFX_INLINE void CXTPDrawHelpers::Triangle(CDC* pDC, CPoint pt0, CPoint pt1, CPoint pt2)
{
CPoint pts[] = { pt0, pt1, pt2 };
pDC->Polygon(pts, 3);
}
AFX_INLINE void CXTPSplitterTracker::SetBoundRect(CRect rcBoundRect)
{
m_rcBoundRect = rcBoundRect;
}
/////////////////////////////////////////////////////////////////////////////
# include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h"
/** @cond */
#endif // !defined(__XTPDRAWHELPERS_H__)
/** @endcond */