Example #1
0
static int GetPrinterDC(HWND hWnd, const char *printcfg, int show)
{
  hDCprinter = NULL;

  if (printcfg)
  {
    return GetCustomPrinterDC(hWnd, printcfg, show);
  }
  hDCprinter = GetDefaultPrinterDC();
  return 1;
}
Example #2
0
int GetCurrentPrinterWidth()
{
	if(g_nPrinterWidth == 0)
	{
		HDC hdcPrn		= GetDefaultPrinterDC();
		g_nPrinterWidth = GetPrinterWidth(hdcPrn);

		DeleteDC(hdcPrn);
	}

	return g_nPrinterWidth;
}