home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
SOURCE
/
PRT.PRG
< prev
next >
Wrap
Text File
|
1993-02-17
|
876b
|
31 lines
#include "windows.ch"
#include "commdlg.ch"
... Sorry about this code snippet, but you should get the idea.
aPrintDlg = array(PD_Length)
aPrintDlg[PD_hwndOwner] = hWnd
aPrintDlg[PD_nFlags] = PD_RETURNDC // this is also the default
// you don't have to init these 2:
aPrintDlg[PD_nMinPage] = 1
aPrintDlg[PD_nMaxPage] = 10
i = PrintDlg(aPrintDlg)
// can get i set to:
// nil error occurred (e.g. aPrintDlg is bad)
// .f. user cancelled
// .t. ok, and aPrintDlg[PD_hDC] is set up
if i == .t.
// you'd print here!
? "hDC", aPrintDlg[PD_hDC]
? "nFlags", aPrintDlg[PD_nFlags]
? "nFromPage", aPrintDlg[PD_nFromPage]
? "nToPage", aPrintDlg[PD_nToPage]
? "nMinPage", aPrintDlg[PD_nMinPage]
? "nMaxPage", aPrintDlg[PD_nMaxPage]
? "nCopies", aPrintDlg[PD_nCopies]
DeleteDC(aPrintDlg[PD_hDC]) // don't forget this!
endif