Printing the control


void CIvSceneListCtrl::Print(CDC* pDC, CPrintInfo* pInfo) {

        CClientDC dcScreen(NULL);
        pDC->SetMapMode(MM_ANISOTROPIC);
        //map 1 screen logical inch to 1 printer.
        pDC>SetWindowExt(       dcScreen.
                                GetDeviceCaps(LOGPIXELSX),dcScreen.
                                GetDeviceCaps(LOGPIXELSX));
        pDC->SetViewportExt(    pDC->GetDeviceCaps(LOGPIXELSX),
                                pDC->GetDeviceCaps(LOGPIXELSX));

        CPen pen(PS_SOLID,1,RGB(0,0,0));
        CPen* OldPen = pDC->SelectObject(&pen);

        CHeaderCtrl* pHeader = (CHeaderCtrl*) GetDlgItem(0);

        if (pHeader) pHeader->SendMessage(WM_PAINT,(WPARAM)pDC->m_hDC);
        SendMessage(WM_PAINT,(WPARAM)pDC->m_hDC);

        pDC->SelectObject(OldPen);
}



Comments

  • Is it possible to get the EMF from the ListView?

    Posted by Legacy on 03/30/2001 12:00am

    Originally posted by: Michael

    I need to insert the image of the ListView table into an RTF
    
    file dynamically from a program.
    Is it possible to get the EMF from the ListView?

    Michael

    Reply
  • Thank You

    Posted by Legacy on 04/18/2000 12:00am

    Originally posted by: Aykut

    This is really an important feature that sometimes is a must.

    Reply
  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • Hundreds of millions of users have adopted public cloud storage solutions to satisfy their Private Online File Sharing and Collaboration (OFS) needs. With new headlines on cloud privacy issues appearing almost daily, the need to explore private alternatives has never been stronger. Join ESG Senior Analyst Terri McClure and Connected Data in this on-demand webinar to take a look at the business drivers behind OFS adoption, how organizations can benefit from on-premise deployments, and emerging private OFS …

Most Popular Programming Stories

More for Developers

RSS Feeds