This page说你需要打电话 PrintSetupDlg , 但这段代码
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)
最佳答案
事实证明,由于某些疯狂的原因,对话框只会绘制到原始的前台缓冲区,即使该缓冲区已被交换并且原始的后台缓冲区现在是前台缓冲区(显示在屏幕上)。
解决方案是跟踪缓冲区被交换了多少次,如果交换次数为奇数,则再次交换它(这会导致显示对话框时,原始前台缓冲区始终是当前前台缓冲区).
关于c++ - 如何在 Windows CE Direct-X 应用程序中显示(打印机)对话框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3276973/