I have a problem getting the resolution of a printer set in the CPrintDialog. I've tried numerous mechanisms but none of them seems to work. I am able to detect the resolution only if the user selects one of the Best, Normal or Draft modes on the Paper/Quality tab of the printer properties dialog. However, when the user checks the Custom check button and sets the resolution using the Advanced button, I am not able to get the correct resolution. I get always the default value.

Is there any way to get the correct value set in the Advanced dialog of the printer properties? I understand the dialog is device-specific but the data must be stored somewhere...