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

Method SetPos

DuiLib/Control/UIActiveX.cpp:908–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908void CActiveXUI::SetPos(RECT rc)
909{
910 CControlUI::SetPos(rc);
911
912 if( !m_bCreated ) DoCreateControl();
913
914 if( m_pUnk == NULL ) return;
915 if( m_pControl == NULL ) return;
916
917 SIZEL hmSize = { 0 };
918 SIZEL pxSize = { 0 };
919 pxSize.cx = m_rcItem.right - m_rcItem.left;
920 pxSize.cy = m_rcItem.bottom - m_rcItem.top;
921 PixelToHiMetric(&pxSize, &hmSize);
922
923 if( m_pUnk != NULL ) {
924 m_pUnk->SetExtent(DVASPECT_CONTENT, &hmSize);
925 }
926 if( m_pControl->m_pInPlaceObject != NULL ) {
927 CDuiRect rcItem = m_rcItem;
928 if( !m_pControl->m_bWindowless ) rcItem.ResetOffset();
929 m_pControl->m_pInPlaceObject->SetObjectRects(&rcItem, &rcItem);
930 }
931 if( !m_pControl->m_bWindowless ) {
932 ASSERT(m_pControl->m_pWindow);
933 ::MoveWindow(*m_pControl->m_pWindow, m_rcItem.left, m_rcItem.top, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top, TRUE);
934 }
935}
936
937void CActiveXUI::DoPaint(HDC hDC, const RECT& rcPaint)
938{

Callers

nothing calls this directly

Calls 3

PixelToHiMetricFunction · 0.85
SetExtentMethod · 0.80
ResetOffsetMethod · 0.80

Tested by

no test coverage detected