How can I change the default printer settings?
You need to get the device structures from the CGXPrintDevice object:
CGXPrintDevice* pDevice = GetPrintDevice( );
if (pDevice)
{
// Ensure that device info is existent
pDevice->NeedDeviceHandles( );
// Now, you can get the device info
LPDEVNAMES pDevNames;
DWORD cbSizeDevNames;
LPDEVMODE pDevMode;
DWORD cbSizeDevMode;
pd->GetDeviceInfo(pDevNames, cbSizeDevNames, pDevMode, cbSizeDevMode);
// Now, you can change this structure
// as documented in the Win31 SDK
// and later call CreateDeviceHandles to apply the changes.
pd->CreateDeviceHandles(pDevNames, cbSizeDevNames, pDevMode, cbSizeDevMode);
delete pDevMode;
delete pDevNames;
}