SilverScreen Solid Modeler

print_scene

print_scene

Previous topic Next topic  

print_scene

Previous topic Next topic JavaScript is required for the print function  

 

SilverPlusRect

SilverEngineRect

 

void print_scene(HDC hOutputDC, HDC hAttribDC, BOOL IsPreview);

 

HDC hOutputDC;   // A handle to an output device context

HDC hAttribDC;   // A handle to an attribute device context

BOOL IsPreview;  // Is this scene being printed for a preview?

 

 




Synopsis

#include "silver.h"

 

The print_scene function instructs the SilverScreen engine to generate a scene for printing onto the specified output and attribute dc.

 

 

Parameters

hOutputDC is the output device context

hAttribDC is the attribute device context

IsPreview is TRUE if the scene is needed for a preview, and FALSE otherwise

 

 

Return Value

none

 

 

Remarks

When the scene is drawn to the output device context, the current page setup and print setup options are used.

 

 

See Also

PAGE command, PRINT command

 

Example

For a complete example see the SilverEngine sample MFCPrint. The following code shows a typical usage for print_scene when a page-style preview is desired, or the normal SilverScreen printing mechanism is otherwise undesired:

 

C / C++ Code

 

//

// OnPrint - Called by the framework to print or preview a page of the

//           document. For each page being printed, the framework

//           calls this function immediately after calling the OnPrepareDC

//           member function.

//

 

void CmfcprintView::OnPrint(CDC* pDC, CPrintInfo* pInfo)

{

int save_dc = pDC->SaveDC();

 

  print_scene(pDC->m_hDC, pDC->m_hAttribDC, pInfo->m_bPreview);

 

pDC->RestoreDC(save_dc);

}

 

void CmfcprintView::OnFilePrint()

{

CView::OnFilePrint();

}