Ejemplo n.º 1
0
// draw the client area into the specified device context
LRESULT CBalloonHelp::OnPrintClient(WPARAM wParam, LPARAM lParam)
{
	CDC* pDC = CDC::FromHandle((HDC)wParam);
	if ( lParam & PRF_ERASEBKGND ) 
		SendMessage( WM_ERASEBKGND, wParam );
	if ( lParam & PRF_CLIENT ) 
		DrawClientArea(pDC);
	return 0;
}
Ejemplo n.º 2
0
HRESULT CMainWindow::OnPaint(
    HDC hdc,
    const RECT &rcPaint
    )
{
    // Update the animation manager with the current time

    UI_ANIMATION_SECONDS secondsNow;
    HRESULT hr = m_pAnimationTimer->GetTime(
        &secondsNow
        );
    if (SUCCEEDED(hr))
    {
        hr = m_pAnimationManager->Update(
            secondsNow
            );
        if (SUCCEEDED(hr))
        {
            // Read the values of the animation variables and draw the client area
        
            hr = DrawClientArea();
            if (SUCCEEDED(hr))
            {
                // Continue redrawing the client area as long as there are animations scheduled
                
                UI_ANIMATION_MANAGER_STATUS status;
                hr = m_pAnimationManager->GetStatus(
                    &status
                    );
                if (SUCCEEDED(hr))
                {
                    if (status == UI_ANIMATION_MANAGER_BUSY)
                    {
                        InvalidateRect(
                            m_hwnd,
                            NULL,
                            FALSE
                            );
                    }
                }
            }
        }
    }

    return hr;
}
Ejemplo n.º 3
0
// draw balloon client area (title & contents)
void CBalloonHelp::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	DrawClientArea(&dc);
}