question

HoNey-6622 avatar image
0 Votes"
HoNey-6622 asked JeanineZhang-MSFT commented

CPrintDialog CommDlgExtendedError

when i use CPrintDialog , (win10,x64)
CPrintDialog PD(TRUE);
PD.DoModal();
it show no dialog and returned IDCANCEL, and i run CommDlgExtendedError () after it,
then returned "CDERR_MEMLOCKFAILURE", it means "The common dialog box function was unable to lock the memory associated with a handle."
but i don't understand it, how can i fix it?what can i do?

windows-serverc++windows-server-printmicrosoft-graph-print
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Adding right tag/teams to assist

0 Votes 0 ·

@HoNey-6622

First of all, if you want to use a CPrintDialog object, you should create the object using the CPrintDialog constructor. You could set or modify any values in the m_pd structure to initialize the values of the dialog box's controls. After initializing the dialog box controls, you could call the DoModal member function to display the dialog box and allow the user to select print options.

Whether you have used CPrintDialog::m_pd to initialize the value of the dialog box control before calling the DoModal function?

For more details, I suggest you could refer to the Doc: https://docs.microsoft.com/en-us/cpp/mfc/reference/cprintdialog-class?view=msvc-160#remarks


0 Votes 0 ·

0 Answers