I'm programming my application and want to let the user select the printer to be used. I found an example for labview, but when I use this in Labwindows/CVI the used structure and function are unknown. The type is defined in commdlg.h but because of some settings it is not available. Can somebody help me to make this work or tell me if there is another way to let the user select the preferred printer. I included windows.h (which include commdlg.h) and used the following calls:
{
HWND hwnd;
/* Defined in the Windows header files */
PRINTDLG lppd;
/* Get the handle to the main window. */
GetPanelAttribute (gMainPanel.handle, ATTR_SYSTEM_WINDOW_HANDLE, &hwnd);
lppd.lStructSize = sizeof(PRINTDLG); /* size of the structure */
lppd.hwndOwner = hwnd; /* dialog box's owner */
lppd.hDevMode = NULL; /* not needed */
lppd.hDevNames = NULL; /* not needed */
lppd.Flags = PD_PRINTSETUP; /* show the Print Setup dialog */
(void) PrintDlg(&lppd);
}