|
안녕하세요..
지금 제가 만드는 프로그램에
현재 창(Form)을 인쇄하는 기능을 넣고 싶은데요
여기서 찾아본 내용을 가지고 다음과 같이 소스를 만들어 봤습니다.
Image2->Picture->Bitmap = Form1->GetFormImage();
if( PrintDialog1->Execute()==true )
{
int ScaleX, ScaleY;
TRect R;
Printer()->Title = "SetSeat 배치결과";
Printer()->Orientation = poLandscape;
Printer()->BeginDoc();
ScaleX = GetDeviceCaps(Printer()->Handle, LOGPIXELSX) / PixelsPerInch;
ScaleY = GetDeviceCaps(Printer()->Handle, LOGPIXELSY) / PixelsPerInch;
R = Rect(30, 30, Image2->Picture->Width * ScaleX, Image2->Picture->Height * ScaleY);
Printer()->Canvas->StretchDraw(R, Image2->Picture->Bitmap);
Printer()->EndDoc();
}
그런데 이렇게 했더니 어떤 컴퓨터에서는 하얀 화면이 출력된다고 하더군요..
인쇄 문제인지 GetFormImage가 문제인지 모르겠습니다.. ㅠㅠ;
혹시 창을 인쇄할 수 있는 다른 방법이 있다면 알려주시면 감사하겠습니다.. ^^
|