git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56003
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxGDIPlusContext::GetSize( wxDouble* width, wxDouble *height )
{
void wxGDIPlusContext::GetSize( wxDouble* width, wxDouble *height )
{
+ HDC hdc = m_context->GetHDC();
- *width = ::GetDeviceCaps(m_context->GetHDC(), HORZRES);
+ *width = ::GetDeviceCaps(hdc, HORZRES);
- *height = ::GetDeviceCaps(m_context->GetHDC(), VERTRES);
+ *height = ::GetDeviceCaps(hdc, VERTRES);
+ m_context->ReleaseHDC(hdc);
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------