Background colour on CAnimateCtrl problem 
Author Message
 Background colour on CAnimateCtrl problem

Hi,

Visual C++ 5 / NT4.0 / Win95

I'm having a problem displaying an animation control above a list view.
The problem occurs when the standard window colour is not white, the
background of the animation does not match the rest of the window.
I am trying to make the animation transparent, and set the background
colour to the correct value by handling WM_CTLCOLOR in the view. The
following code works fine under Windows 95, but not under NT 4?

Could this be due to a difference in the CAnimateCtrl implementations in

the common control DLL's, or am I doing something wrong in the
WM_CTLCOLOR handler?

Any help would be much appreciated

Rory Wallace.

/*------------------------------------------------------------*/
/* Code sample follows - CxxxView derived from CListView */
// CAnimateCtrl m_anim

void CxxxView::OnInitialUpdate()
{
// ...
// Animation created normally, nothing special
// ACS_TRANSPARENT flag set
  m_anim.Create( WS_CHILD
        | ACS_CENTER | ACS_TRANSPARENT,
        CRect(100, 200,300,400), &(this->GetListCtrl()), ID_RESERVED);

Quote:
}

HBRUSH CxxxView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
 HBRUSH hbr = CListView::OnCtlColor(pDC, pWnd, nCtlColor);

 if ( pWnd->m_hWnd == m_anim.m_hWnd)
    {
        pDC->SetBkColor( GetSysColor(COLOR_WINDOW));
    }
 return hbr;

Quote:
}



Mon, 17 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. CStatic Text Background Colour problem

2. CAnimateCtrl (transparent background)

3. Background color of CAnimateCtrl???

4. Background colour for TreeView.SelectedNode

5. Background Colour

6. Background colour in a CEdit control

7. CreateWindow Background Colour

8. Background Colour: Changing

9. Setting window background colour from a DLL

10. Background Colour of an editbox

11. Changing the text and background colour of single row in CListView

12. Indentation & Background colour

 

 
Powered by phpBB® Forum Software