2010-07-18 30 views
1

This page說,你需要調用PrintSetupDlg,但是這個代碼如何在Windows CE Direct-X應用程序中顯示(打印機)對話框?

PAGESETUPDLG printDialog; 
ZeroMemory(&printDialog, sizeof(printDialog)); 
printDialog.lStructSize = sizeof(printDialog); 
printDialog.hwndOwner = hwnd; //or = NULL 

PageSetupDlg(&printDialog); 

凍結在調用PageSetupDlg程序 - 它變得反應遲鈍,我需要停止進程。

如何在Windows CE中打印?(在DirectX應用程序中使用C++,CE 6.0)

回答

1

原來,出於某種瘋狂的原因,即使該緩衝區已被交換並且原始的後臺緩衝區現在只是對話框被繪製到原始前臺緩衝區前臺緩衝區(顯示在屏幕上)。

解決方案是跟蹤緩衝區被交換的次數,如果交換次數爲奇數(這會導致當對話框爲原始前端緩衝區時始終爲當前前端緩衝區)示出)。

相關問題