Показать сообщение отдельно
Старый 29.11.2004, 19:02     # 3
kot_
Junior Member
 
Аватар для kot_
 
Регистрация: 19.11.2004
Адрес: Dnepropetrovsk
Пол: Male
Сообщения: 67

kot_ Путь к славе только начался
Или, используй TPrinter+TCanvas - если хочется все сделать самому. На канве рисуешь предпросмотр -на принтере печатаешь. Например так
Код:
TCanvas *pCanvas = Prn->Canvas;
 int PosVert = Vert,PosGor = 0;
  pCanvas->Brush->Color = clWhite;
   pCanvas->Font->Size = 14;
  pCanvas->Font->Color = clBlack;
  pCanvas->Font->Style=TFontStyles()<< fsBold;
  if(PosVert >= (Prn->PageHeight-BottomWidth)){
   Prn->NewPage();
   PosVert = TopWidth;
  }
  AnsiString String = InvoiceIn.GetName()+" № "+InvoiceIn.GetCode();
  if(Vert==0)PosVert = TopWidth;
  PosGor = Prn->PageWidth/2;
  PosGor -= (pCanvas->TextWidth(String)/2);

  pCanvas->TextOutA(PosGor,PosVert,String);
  if(PosVert >= (Prn->PageHeight-BottomWidth)){
   Prn->NewPage();
   PosVert = TopWidth;
  }
  PosVert += pCanvas->TextHeight(InvoiceIn.GetName()+" № "+InvoiceIn.GetName());
  pCanvas->Font->Size = 12;
  if(PosVert >= (Prn->PageHeight-BottomWidth)){
   Prn->NewPage();
   PosVert = TopWidth;
  }
  PosVert += (pCanvas->TextHeight(String)*2);

  String = "Дата: " + InvoiceIn.GetDate();
  PosGor = Prn->PageWidth/2;
  PosGor -= (pCanvas->TextWidth(String)/2);
  pCanvas->TextOutA(PosGor,PosVert,String);
  pCanvas->Font->Size = 10;
  if(PosVert >= (Prn->PageHeight-BottomWidth)){
   Prn->NewPage();
   PosVert = TopWidth;
  }
....
//И так далее.
__________________
kot_ вне форума