added wxRectFromRECT()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -236,13 +236,16 @@ struct WXDLLEXPORT wxCOLORMAP
|
|||||||
// this function is implemented in src/msw/window.cpp
|
// this function is implemented in src/msw/window.cpp
|
||||||
extern wxCOLORMAP *wxGetStdColourMap();
|
extern wxCOLORMAP *wxGetStdColourMap();
|
||||||
|
|
||||||
|
// create a wxRect from Windows RECT
|
||||||
|
inline wxRect wxRectFromRECT(const RECT& r)
|
||||||
|
{
|
||||||
|
return wxRect(r.left, r.top, r.right - r.left, r.bottom - r.top);
|
||||||
|
}
|
||||||
|
|
||||||
// copy Windows RECT to our wxRect
|
// copy Windows RECT to our wxRect
|
||||||
inline void wxCopyRECTToRect(const RECT& r, wxRect& rect)
|
inline void wxCopyRECTToRect(const RECT& r, wxRect& rect)
|
||||||
{
|
{
|
||||||
rect.y = r.top;
|
rect = wxRectFromRECT(r);
|
||||||
rect.x = r.left;
|
|
||||||
rect.width = r.right - r.left;
|
|
||||||
rect.height = r.bottom - r.top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// translations between HIMETRIC units (which OLE likes) and pixels (which are
|
// translations between HIMETRIC units (which OLE likes) and pixels (which are
|
||||||
|
Reference in New Issue
Block a user