Getting HDC for printer:
TCHAR szPrinter[255];
DWORD nLen;
if (GetDefaultPrinter( szPrinter, &nLen )) {
//HDC hDCPrn = CreateDC("WINSPOOL", szPrinter, NULL, NULL);
HDC hDCPrn = CreateDC(NULL, szPrinter, NULL, NULL);
//HDC hDCPrn = CreateDC(NULL, "\\\\foo-svr\\foo-printer", NULL, NULL);
...
}