|
pfc_printdlg
|
|
Full name
|
pfc_u_rte.pfc_printdlg
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_printdlg(ref s_printdlgattrib)
|
Name
|
Datatype
|
li_pagecount
|
integer
|
ll_rc
|
long
|
lnv_platform
|
n_cst_platform
|
lw_parent
|
window
|
event pfc_printdlg;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_printdlg
//
// Arguments:
// astr_printdlg: print dialog structure by ref
//
// Returns: integer
// 1 = success
// -1 = error
//
// Description:
// Opens the print dialog and stores the print values the user selected.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
integer li_pagecount
long ll_rc
n_cst_platform lnv_platform
window lw_parent
// Initialize printdlg structure
astr_printdlg.b_allpages = true
astr_printdlg.b_disableselection = true
astr_printdlg.b_hideprinttofile = true
astr_printdlg.l_frompage = 1
astr_printdlg.l_minpage = 1
li_pagecount = this.PageCount()
if li_pagecount > 0 then
astr_printdlg.l_topage = li_pagecount
astr_printdlg.l_maxpage = li_pagecount
else
astr_printdlg.b_disablepagenums = true
end if
// Allow user values in printdlg structure before opening print dlg
this.event pfc_preprintdlg (astr_printdlg)
// Open print dialog
f_setplatform (lnv_platform, true)
this.of_GetParentWindow (lw_parent)
ll_rc = lnv_platform.of_PrintDlg (astr_printdlg, lw_parent)
f_setplatform (lnv_platform, false)
return ll_rc
end event