Page 1 of 1

landscape/portrait printing

Posted: Thu Oct 12, 2006 10:53 am
by 9080443
Hi,

I am using ActiveX 6/VC++ 6 and CHartPreviewPanel for printing. I have found that it has method to set the orientation of printout. Basically here's my code :

Code: Select all

CButton *pLandscapeOrient = (CButton*) GetDlgItem(IDC_PRINT_LANDSCAPE_RADIO);


if (pLandscapeOrient->GetCheck()) {
	m_ctlChartPreviewPanel.SetOrientation(1); 
} else {
	m_ctlChartPreviewPanel.SetOrientation(0); 
}

m_ctlChartPreviewPanel.PrintPage();
But it does not have any effect whatever I set 1 or 0 there. It always prints as landscape.

Any ideas? Thank you in advance.

Best regards,
Michael.

Posted: Fri Oct 13, 2006 10:15 am
by narcis
Hi Michael,

Have you tried using 1 for portrait and 2 for landscape?

Posted: Sat Oct 14, 2006 3:30 pm
by 9080443
Hi Narcis,
narcis wrote:Hi Michael,

Have you tried using 1 for portrait and 2 for landscape?
That worked like a charm. Thanks!