| 906 | } |
| 907 | |
| 908 | void 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 | |
| 937 | void CActiveXUI::DoPaint(HDC hDC, const RECT& rcPaint) |
| 938 | { |
nothing calls this directly
no test coverage detected