In my application I pop a print dialog box that (among other things) enables a user to select the print tray for the front page and a print tray for other pages. I then get the DevMode from the printer object:
LPDEVMODE pDevMode = (LPDEVMODE)::GlobalLock(pPrinter->hDevMode);
When I look at the DevMode structure I can get the default source:
m_pDevMode->dmDefaultSource
which is the 'Other Pages' selection, but I can't get the tray number of the first page selection. Any ideas how I can obtain both tray numbers?