🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1700

Re: Dialog child window

#1700
From: Remy Lebeau (TeamB)
Date: Wed, 20 Jun 2007 16:50
45 lines
2359 bytes
"JD" <nospam@nospam.com> wrote in message
news:4678ea55@newsgroups.borland.com...

> It doesn't work like that. The Collate property is always false -
period -
> even after checking it and closing the dialog.

According to the Win32 API documentation:

    PRINTDLG
    Flags

    PD_COLLATE
    Places a checkmark in the Collate check box when set on input.
When the PrintDlg function returns, this flag indicates that the user
selected the Collate option and the printer driver does not support
collation. In this case, the application must provide collation. If
PrintDlg sets the PD_COLLATE flag on return, the dmCollate member of
the DEVMODE structure is undefined.

So in this case, if you check on the Collate checkbox and close the
dialog, the Collate property will be false if your printer actually
supports collation, so you don't have to do anything extra for it.
For example:

    if( PrintDialog1->Execute() )
    {
        if( PrintDialog1->Collate )
        {
            // you have to implementation collation yourself in your
printing code...
        }
        else
        {
            // the printer will handle the collation automatically, or
the
            // user did not choose to use collation. either way, there
is
            // nothing extra for you to do here ...
        }
    }


Gambit
Technical Details
Message-ID: <46795b23$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46785769@newsgroups.borland.com> <46785c64$1@newsgroups.borland.com> <4678ea55@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,17b336d121cbb12d
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46785769@newsgroups.borland.com> <46785c64$1@newsgroups.borland.com> <4678ea55@newsgroups.borland.com>
Subject: Re: Dialog child window
Date: Wed, 20 Jun 2007 09:50:51 -0700
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.82.252.126
Message-ID: <46795b23$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1182358307 75.82.252.126 (20 Jun 2007 09:51:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 2213