Привет. Есть диалог, на нем TabCtrl. в OnSize вызываю SetWindowPos для таб контрола, а он от этого мерцает. Ктонить знает, как исправить? Причем, если в диалоге выключен "Clip children", мерцают любые контролы, а если включен, то только TabCtrl.
| Код | void CDlg1::OnSize(UINT nType, int cx, int cy) { CDialog::OnSize(nType, cx, cy); // TODO: Add your message handler code here if(m_MainTab.m_hWnd == NULL) return; // Return if window is not created yet. CWnd *tmp; RECT lpRect, newRect; GetClientRect(&lpRect); lpRect.top += 11; lpRect.left += 11; lpRect.right -= 12; lpRect.bottom -= 12; newRect = lpRect; newRect.bottom -= 37; tmp = &m_MainTab; //tmp = GetDlgItem(IDOK); tmp->SetWindowPos(NULL, newRect.left, newRect.top , newRect.right - newRect.left, newRect.bottom - newRect.top, SWP_NOZORDER ); }
|
|