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 » CExtBitmap question Collapse All
Subject Author Date
tera tera Jun 11, 2009 - 2:14 AM

Hello.


Though I set transparence color in CExtBitMap, bitmap does not become transparent.

Please teach a cause.



 


 virtual void OnPaintButton(   const RECT & rcButton,   INT nButtonType, // e_button_type_t   bool bPressed,   bool bHovered,   bool bFocused,   bool bEnabled,   const CExtGridWnd & wndGrid,   CDC & dc,   LONG nVisibleColNo,   LONG nVisibleRowNo,   LONG nColNo,   LONG nRowNo,   INT nColType,   INT nRowType,   const RECT & rcCellExtra,   const RECT & rcCell,   const RECT & rcVisibleRange,   DWORD dwAreaFlags,   DWORD dwHelperPaintFlags  ) const  {   ASSERT_VALID( this );   ASSERT_VALID( (&wndGrid) );   ASSERT( dc.GetSafeHdc() != NULL );   if( ! dc.RectVisible(&rcButton) )    return;   nVisibleColNo; nVisibleRowNo; nColNo; nRowNo; nColType; nRowType;   rcCellExtra; rcCell; rcVisibleRange; dwAreaFlags;   if( ! bEnabled )    bPressed = false;   if( (dwHelperPaintFlags&__EGCPF_SIMPLIFIED_RENDERING_TARGET) == 0 )   {    COLORREF clrFace   = wndGrid.OnSiwGetSysColor( COLOR_3DFACE );    COLORREF clrLight  = wndGrid.OnSiwGetSysColor( COLOR_3DHIGHLIGHT );    COLORREF clrShadow = CExtPaintManager::stat_HLS_Adjust( wndGrid.OnSiwGetSysColor( COLOR_3DSHADOW ) , 0.0, 0.35, 0.0 );    COLORREF clrWindow = wndGrid.OnSiwGetSysColor( COLOR_WINDOW );    COLORREF clrText   = wndGrid.OnSiwGetSysColor( COLOR_BTNTEXT );

   wndGrid.PmBridge_GetPM()->Grid_PaintButton( dc, rcButton, nButtonType, bPressed, bHovered, bFocused, bEnabled, clrFace, clrLight, clrShadow, clrWindow, clrText, dwHelperPaintFlags, (CObject*) &wndGrid, 0L );

 if ( m_pEllipsis.IsEmpty() ){   m_pEllipsis.LoadBMP_Resource( MAKEINTRESOURCE( /*IDB_GRID_ICONS*/ IDB_KAKO_OUKA_SIGUTI_BTN ) );   m_pEllipsis.Make32();   m_pEllipsis.AlphaColor( RGB(255,0,255) , RGB(0,0,0), 0 );  }

 CRect cRect = rcButton;  cRect.DeflateRect( 1 , 1 );

 m_pEllipsis.Draw( dc.m_hDC , cRect  );

Technical Support Jun 11, 2009 - 5:42 AM

Please use the CExtBitmap::AlphaBlend() method instead of CExtBitmap::Draw().