added wxRectFromRECT()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-12-11 23:32:20 +00:00
parent df83b840bb
commit 9688700c97

View File

@ -236,13 +236,16 @@ struct WXDLLEXPORT wxCOLORMAP
// this function is implemented in src/msw/window.cpp
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
inline void wxCopyRECTToRect(const RECT& r, wxRect& rect)
{
rect.y = r.top;
rect.x = r.left;
rect.width = r.right - r.left;
rect.height = r.bottom - r.top;
rect = wxRectFromRECT(r);
}
// translations between HIMETRIC units (which OLE likes) and pixels (which are