Wrox Programmer Forums
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 28th, 2003, 09:03 AM
Registered User
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default I'm a new member..

Hihi all ..

I'm a beginer with VC++ .. but it is not easy !!!

Pls help me how to know tracker the printer .. control the number of the pages printed from printer with my program ... thank you very very much ...

I've tried with many method but .... failed

... sorry about my english .. pls hepl me .. thanks indeed !!!

Do Hoang Trieu
--- thanks ---
Old August 12th, 2003, 07:21 AM
Authorized User
Join Date: Aug 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

You should be able to use parts of the following code. I was not sure I understood exactly what you wanted. To set the minimun and maximum number of pages call the SetMinPage() and SetMaxPage() functions of the CPrintInfo* object passed into the OnPreparePrinting function you might have in your View class.

BOOL CYourView::OnPreparePrinting(CPrintInfo* pInfo)
    if (!AfxGetApp()->GetPrinterDeviceDefaults(&pInfo->m_pPD->m_pd))
        // bring up dialog to alert the user they need to install a printer.
        if (AfxGetApp()->DoPrintDialog(pInfo->m_pPD) != IDOK)
            return FALSE;

    // set page info

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi.. new member here.. renai C# 1 August 26th, 2007 11:20 AM
Member List jamez36 SQL Server 2005 2 May 21st, 2007 04:50 PM
ReportDefinition is not a member of... jmurdock Crystal Reports 0 February 8th, 2006 05:10 PM
Hello from a new member aehb C# 0 March 10th, 2005 05:51 PM
Member kilika Forum and Wrox.com Feedback 6 July 18th, 2003 12:37 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.