Hello,
In my application, the user selects the printer for the application on a menu screen. At print time I am loading a dialog box and want the previously selected printer to default into the dialog box (under the "Name:" field) as the printer but it is always being populated with the Windows Default Printer instead of the selected printer. Below is my code... any suggestions are appreciated. Thank you in advance for your help and time!
Code:
// PRINTER SELECTED BY USER IN BSTR, CSTRING, AND LPCTSTR FORM
CString str = g_csCustomPrinter;
LPCTSTR lpctstr = g_csCustomPrinter;
BSTR bstr = str.AllocSysString();
// NEED SOMETHING HERE TO POPULATE DIALOG BOX WITH PRINTER
CPrintDialog cPrint(FALSE, PD_HIDEPRINTTOFILE | PD_NOPAGENUMS | PD_NOSELECTION, parent_view);
// THIS LOADS THE PRINT DIALOG BOX
if(cPrint.DoModal() == IDOK)
{
//EXECUTE SOME CODE
}