// 控件的位置信息需要刷新 void CControlBase::OnPositionChange() { // 刷新控件自身的位置 OnAttributePosChange(m_strPos, FALSE); // 刷新子控件的位置 for (size_t i = 0; i < m_vecControl.size(); i++) { CControlBase * pControlBase = m_vecControl.at(i); if (pControlBase) { pControlBase->OnPositionChange(); } } }
// 设置原生控件对象的窗口句柄 bool CDuiNativeWnd::SetNativeHWnd(HWND hWnd) { if(hWnd == NULL) { return false; } ReleaseControl(); m_hwndHost = hWnd; bool bRet = false; if(m_hwndHost && ::IsWindow(m_hwndHost)) { SetControlWndVisible(FALSE); OnAttributePosChange(GetPosStr(), FALSE); bRet = true; } return bRet; }