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

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

  • When it comes to desktops – physical or virtual – it's all about the applications. Cloud-hosted virtual desktops are growing fast because you get local data center-class security and 24x7 access with the complete personalization and flexibility of your own desktop. Organizations make five common mistakes when it comes to planning and implementing their application management strategy. This eBook tells you what they are and how to avoid them, and offers real-life case studies on customers who didn't …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds