For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

\15_AdditionalSamples\15_4_TexturesExt

Barna Otvos's picture
Forums: 

Hi,

I have made the following changes:

Sample : C:\OpenCASCADE5.0\samples\standard\mfc\15_AdditionalSamples\15_4_TexturesExt

File : C:\OpenCASCADE5.0\samples\standard\mfc\15_AdditionalSamples\Common\WNT\OCCDemoDoc.cpp

#include

#include

void COCCDemoDoc::OnDumpView()

{

CPrintDialog dlg(FALSE, PD_ALLPAGES | PD_HIDEPRINTTOFILE ,NULL);

if (dlg.DoModal() == IDOK)

{

CString theDevice = dlg.GetDeviceName();

Standard_Integer copies = dlg.GetCopies();

LPDEVMODE devmode = dlg.GetDevMode();

Standard_Real scale = devmode->dmScale;

Standard_Integer orientation = devmode->dmOrientation;

enum WNT_OrientationType casOrient;

switch (orientation)

{

case DMORIENT_PORTRAIT:

casOrient = WNT_OT_PORTRAIT;

break;

case DMORIENT_LANDSCAPE:

casOrient = WNT_OT_LANDSCAPE;

break;

}

POSITION pos = GetFirstViewPosition();

while (pos != NULL)

{

COCCDemoView* pView = (COCCDemoView*) GetNextView(pos);

pView->UpdateWindow();

}

myViewer->InitActiveViews();

Handle(V3d_View) aView = myViewer->ActiveView();

Handle(WNT_DDriver) myWNTDriver = new WNT_DDriver((Standard_CString)(LPCTSTR)theDevice,"spool.ps",casOrient,scale,copies);

aView->ScreenCopy(myWNTDriver,Standard_True,scale); // V3d_View.cxx

myWNTDriver->Spool(Aspect_PM_NPLOTTER,(Standard_CString)(LPCTSTR)theDevice,Standard_True);

myWNTDriver->Close();

}

}

Don't work.

Where is the problem?

Would you send me a small sample project?

Thank you very much!

Barna