fixed deprecation warnings; removed #if 0'd code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0604740afd
commit
6505ca85df
@ -1115,28 +1115,6 @@ void wxActiveXContainer::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
// Draw only when control is windowless or deactivated
|
||||
if (m_viewObject)
|
||||
{
|
||||
#if 0
|
||||
dc.BeginDrawing();
|
||||
RECT rcClient;
|
||||
::GetClientRect((HWND)GetHandle(), &rcClient);
|
||||
|
||||
HBITMAP hBitmap = CreateCompatibleBitmap((HDC)dc.GetHDC(),
|
||||
rcClient.right - rcClient.left,
|
||||
rcClient.bottom - rcClient.top);
|
||||
HDC hdcCompatible = ::CreateCompatibleDC((HDC)dc.GetHDC());
|
||||
HBITMAP hBitmapOld = (HBITMAP)SelectObject(hdcCompatible, hBitmap);
|
||||
|
||||
m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
|
||||
hdcCompatible, (RECTL *) &rcClient, (RECTL *) &rcClient, NULL, 0);
|
||||
|
||||
::BitBlt((HDC)dc.GetHDC(), 0, 0, rcClient.right, rcClient.bottom, hdcCompatible, 0, 0, SRCCOPY);
|
||||
|
||||
::SelectObject(hdcCompatible, hBitmapOld);
|
||||
::DeleteObject(hBitmap);
|
||||
::DeleteDC(hdcCompatible);
|
||||
dc.EndDrawing();
|
||||
#else
|
||||
dc.BeginDrawing();
|
||||
int w, h;
|
||||
GetParent()->GetSize(&w, &h);
|
||||
RECT posRect;
|
||||
@ -1149,9 +1127,6 @@ void wxActiveXContainer::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
RECTL *prcBounds = (RECTL *) &posRect;
|
||||
m_viewObject->Draw(DVASPECT_CONTENT, -1, NULL, NULL, NULL,
|
||||
(HDC)dc.GetHDC(), prcBounds, NULL, NULL, 0);
|
||||
|
||||
dc.EndDrawing();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user