MCPcopy Create free account
hub / github.com/cinience/RedisStudio / GetDC

Method GetDC

DuiLib/Control/UIActiveX.cpp:467–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467STDMETHODIMP CActiveXCtrl::GetDC(LPCRECT pRect, DWORD grfFlags, HDC* phDC)
468{
469 DUITRACE(_T("AX: CActiveXCtrl::GetDC"));
470 if( phDC == NULL ) return E_POINTER;
471 if( m_pOwner == NULL ) return E_UNEXPECTED;
472 *phDC = ::GetDC(m_pOwner->m_hwndHost);
473 if( (grfFlags & OLEDC_PAINTBKGND) != 0 ) {
474 CDuiRect rcItem = m_pOwner->GetPos();
475 if( !m_bWindowless ) rcItem.ResetOffset();
476 ::FillRect(*phDC, &rcItem, (HBRUSH) (COLOR_WINDOW + 1));
477 }
478 return S_OK;
479}
480
481STDMETHODIMP CActiveXCtrl::ReleaseDC(HDC hDC)
482{

Callers

nothing calls this directly

Calls 1

ResetOffsetMethod · 0.80

Tested by

no test coverage detected