줄끝공백제거->단락간격모두제거하면 죽음
INT PrintTest()

{

   DWORD   size;

   HDC     hdcPrint;

   HANDLE  printerHandle;

 

   DOCINFO docInfo;

   ZeroMemory(&docInfo, sizeof(DOCINFO));

   docInfo.cbSize = sizeof(DOCINFO);

   docInfo.lpszDocName = "GdiplusPrint";

 

   // Get the length of the printer name.

   GetDefaultPrinter(NULL, &size);

   TCHAR* buffer = new TCHAR[size];

 

   // Get the printer name.

   if(!GetDefaultPrinter(buffer, &size))

   {

      printf("Failure");

   }

   else

   {

      // Get a device context for the printer.

      hdcPrint = CreateDC(NULL, buffer, NULL, NULL);

 

      // Get a printer handle.

      OpenPrinter(buffer, &printerHandle, NULL);

 

      StartDoc(hdcPrint, &docInfo);

      StartPage(hdcPrint);

        Example_GetDpiX(hdcPrint);

        /*

         Graphics* graphics = new Graphics(hdcPrint, printerHandle);

         Pen* pen = new Pen(Color(255, 0, 0, 0));

         graphics->DrawRectangle(pen, 0, 0, 200, 150);

         graphics->DrawEllipse(pen, 0, 0, 200, 150);

         delete(pen);

         delete(graphics);

         */

      EndPage(hdcPrint);

      EndDoc(hdcPrint);

 

      ClosePrinter(printerHandle);

      DeleteDC(hdcPrint);

   }

 

   delete buffer;

   

   return 0;

}

