Subj : How to select a non-default printer? To : borland.public.cpp.borlandcpp From : "David Ayre" Date : Tue Jan 06 2004 02:36 am I use a routine that automatically selects the default printer, But I would now like to be able to override the default selection and select another printer. I use this code to obtain the printer info:- PRINTDLG sPd; LPDEVMODE ptr; LPDEVNAMES lpDevNames; memset(&sPd,0,sizeof(PRINTDLG)); sPd.lStructSize = sizeof(PRINTDLG); sPd.hwndOwner = hWnd; sPd.Flags = PD_RETURNDEFAULT; PrintDlg(&sPd); lpDevNames = (LPDEVNAMES)GlobalLock(sPd.hDevNames); lpcDriver = (LPSTR)lpDevNames + lpDevNames->wDriverOffset; lpcDevice = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset; lpcPort = (LPSTR)lpDevNames + lpDevNames->wOutputOffset; GlobalUnlock(sPd.hDevNames); ptr = (LPDEVMODE)GlobalLock(sPd.hDevMode); and this gives me the default printer. Any ideas? Cheers, David .