home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4611
/
fw16d.ins
/
SAMPLES
/
TESTPPV.PRG
< prev
next >
Wrap
Text File
|
1994-05-17
|
1KB
|
52 lines
// FiveWin Print Preview Prototype
// Based on an original idea of Garry Prefontaine
// Thanks Garry
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oPPV
SET 3DLOOK ON
DEFINE DIALOG oDlg RESOURCE "PrintPV"
REDEFINE PRINTPREVIEW oPPV ;
VIEWSIZE 800, 1200 ;
ID 110 OF oDlg ;
ON PAINT PageDisplay( oPPV )
REDEFINE BUTTON ID 150 OF oDlg ;
ACTION ( oPPV:nViewWidth -= 100, oPPV:nViewHeight -= 100, oPPV:Refresh())
REDEFINE BUTTON ID 160 OF oDlg ;
ACTION ( oPPV:nViewWidth += 100, oPPV:nViewHeight += 100, oPPV:Refresh())
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function PageDisplay( oPPV )
local oFont
DEFINE FONT oFont NAME "Arial" SIZE 7, 10
oPPV:Box( 5, 5, 450, 600 )
oPPV:Say( 2, 2, "Hello Garry!",,, oFont )
oPPV:Say( 4, 2, "This is a page preview!",,, oFont )
// oPPV:SayBitmap( 15, 30, "..\bitmaps\FW.bmp" )
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//