Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Simple Style CExtComboBox Collapse All
Subject Author Date
Michael Valentine Mar 15, 2006 - 7:18 AM

If I set a CExtComboBox to be of type "Simple" then it does not draw correctly. It appears to try to draw as a "Drop List" style. Is the simple style not implemented or am I missing something? If I try to use a standard CComboBox then it flickers on dialog resizing and also the bottom of the list is not drawn correctly and jumps on resizing. Switching "No Integral Height" to False helps with the jumping, but the bottom of the frame is still drawn incorrectly.

Thanks

Technical Support Mar 16, 2006 - 1:30 AM

We fixed this problem and the bug fix will be available in the next minor release (will be released within a week).
In case of standard CComboBox, you can use the following class to fix invalid drawing at the bottom of the list:

class CSimpleComboBox : public CComboBox
{
protected:
 virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
 {
  switch( message )
  {
  case WM_PAINT:
   {
    CPaintDC dcPaint( this );
    CExtPaintManager::stat_ExcludeChildAreas(
     dcPaint.GetSafeHdc(),
     GetSafeHwnd()
     );
    CRect rcClient;
    GetClientRect( &rcClient );
    CExtMemoryDC dc(
     &dcPaint,
     &rcClient
     );
    if(  (! g_PaintManager->GetCb2DbTransparentMode(this) )
     || (! g_PaintManager->PaintDockerBkgnd( true, dc, this ) )
     )
     dc.FillSolidRect( &rcClient, g_PaintManager->GetColor(CExtPaintManager::CLR_3DFACE_OUT) );
   }
   return TRUE;
  case WM_ERASEBKGND:
   return FALSE;
  } // switch( message )
  return CComboBox::WindowProc( message, wParam, lParam );
 }
};