打印预览的方向 打印预览时文字斜显示,每次刷新(放大、缩小)时显示方向不一样。设置成横向预览时,文字垂直显示。另外怎么改变背景的预览方向。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void EkChangePrintingOrientation( CDC* pDC, CPrintInfo* pInfo, short NewOrientation ){ ASSERT_VALID( pDC ); ASSERT( pInfo != NULL ); DEVMODE* pDevMode = pInfo->m_pPD->GetDevMode(); // Only change if new orientation is different if( pDevMode->dmOrientation != NewOrientation ) { pDevMode->dmOrientation = NewOrientation; pDC->ResetDC( pDevMode ); }}void CDrawView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) { // Programatically force the page's orientation if( pInfo != NULL ) { // Find out the orientation we want: every third page // will print in "landscape" mode BOOL bLandscape = ( ( pInfo->m_nCurPage % 3 ) == 0 ); short NewOrientation = bLandscape ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT; EkChangePrintingOrientation( pDC, pInfo, NewOrientation ); } CView::OnPrepareDC(pDC, pInfo); pDC->SetMapMode( MM_LOMETRIC );} EDIT控件 如何判断用户对对话框进行了操作? 内存访问冲突。 我做如下的ADO初始化操作,为什么运行时总是出现致命错误? SetScrollSizes里面的sizeTota最大值是多少啊 请教socket问题 有谁用Netmeeting SDK开发过音频和视频的软件,能给我说说怎么做吗? 如何把一个大的图像存为bmp格式? D3D初始化的问题,为什么编译成功没有显示窗口,跪求大神帮忙!! 在对话框程序中,如何得知某CEdit控件已经输入结束 下载电子书的好地方 请教熟悉多媒体的高手,有没有一些受欢迎或好用的播放MPEG或RM的库(LIB或DLL)?非常感谢!
{
ASSERT_VALID( pDC );
ASSERT( pInfo != NULL ); DEVMODE* pDevMode = pInfo->m_pPD->GetDevMode(); // Only change if new orientation is different
if( pDevMode->dmOrientation != NewOrientation )
{
pDevMode->dmOrientation = NewOrientation;
pDC->ResetDC( pDevMode );
}
}void CDrawView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
// Programatically force the page's orientation
if( pInfo != NULL )
{
// Find out the orientation we want: every third page
// will print in "landscape" mode
BOOL bLandscape = ( ( pInfo->m_nCurPage % 3 ) == 0 );
short NewOrientation = bLandscape ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT; EkChangePrintingOrientation( pDC, pInfo, NewOrientation );
} CView::OnPrepareDC(pDC, pInfo); pDC->SetMapMode( MM_LOMETRIC );
}