CPrintDialog Exemplare setzten
-
Moin,
ich möchte das Anzahl der Exemplare schon auf 3 steht.
Aber mit "CPrintDialog.m_pd.nCopies = 3;" werde ich nix.
Was muss ich tuhen damit ich von 1 Exemplar auf drei komme?Vielen Dank schon mal im voraus!
-
Das ist nat blöd.
Ich würde eine Klasse von CPrintDialog ableiten und in OnInitDialog das Edit auf den Wert von m_pd.nCopies setzen.// oder:
Alternativ den Dialog mit Create erstellen und via SetDlgItemText den Wert manuell ändern. Das erfordert dann um den Dialog noch 'Modal' zu halten eine extra MessageLoop und das Parent zu Disablen.
-
Was ich grad in der MSDN gelesen hab:
PRINTDLG::hDevMode Handle to a movable global memory object that contains a DEVMODE structure. If hDevMode is not NULL on input, you must allocate a movable block of memory for the DEVMODE structure and initialize its members. The PrintDlg function uses the input data to initialize the controls in the dialog box. When PrintDlg returns, the DEVMODE members indicate the user's input. If hDevMode is NULL on input, PrintDlg allocates memory for the DEVMODE structure, initializes its members to indicate the user's input, and returns a handle that identifies it. If the device driver for the specified printer does not support extended device modes, hDevMode is NULL when PrintDlg returns. If the device name (specified by the dmDeviceName member of the DEVMODE structure) does not appear in the [devices] section of WIN.INI, PrintDlg returns an error. For more information about the hDevMode and hDevNames members, see the Remarks section at the end of this topic.
[ Dieser Beitrag wurde am 24.09.2002 um 16:39 Uhr von Nemesyzz editiert. ]