ComboBox problems when moving...
-
Hi everyone, I have the following code that works GREAT except for when ComboBox controls are present...
::GetWindowRect(hWndChild, &rect); topLeft.x = rect.left; topLeft.y = rect.top; bottomRight.x = rect.right; bottomRight.y = rect.bottom; ::ScreenToClient( pData->pParentWnd->m_hWnd, &topLeft ); ::ScreenToClient( pData->pParentWnd->m_hWnd, &bottomRight ); if ( pData->uFlags & KCSB_ATTACH_LEFT ) { topLeft.x += pData->nOffset; bottomRight.x += pData->nOffset; } else if ( pData->uFlags & KCSB_ATTACH_TOP ) { topLeft.y += pData->nOffset; bottomRight.y += pData->nOffset; } ::SetWindowPos( hWndChild, 0, topLeft.x, topLeft.y, bottomRight.x - topLeft.x, bottomRight.y - topLeft.y, SWP_FRAMECHANGED | SWP_NOZORDER );
Ok, here is the scenario. At some point, that code will be executed to shift all child windows on a parent dialog up by a certain offset. Everything works great, and even the combobox's shift.. BUT If the combobox controls are shifted, they lose their ability to display their text in the contained edit control, they don't show their cursor (when focus is on them) and they don't show anything that is being entered into them (but they do store the data, and one can query the text programmatically). The drop downs work great tho ;) Any ideas? (I'm using MFC7 for this, but I don't think thats the problem...)
www.kinkycode.com [Glossary Manager] [AfterThought Backup Lite] 99 little bugs in the code, 99 little bugs, Fix 1 bug, recompile.... 101 little bugs in the code...