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.

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds