home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOKAN 17
/
DOKAN17.iso
/
Progs
/
Pjv03dde.zip
/
PJV03DDE
/
SRCCODE
/
SAMPLE1
/
SAMPLE1U.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1999-08-14
|
2KB
|
82 lines
unit sample1u;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, Printers, Nihongo;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const
ERR00 = 'Error while initializing Nihongo Engine!'+#10+
'(Remerber: ' + jJAPFNT + ' and ' + jASCFNT + ' must be in program''s folder!)';
EUCSRC = '╞ⁿ╦▄╕∞í┌ñ╦ñ█ñ≤ñ┤í█';
var
Form1 : TForm1;
EUC : String;
implementation
{$R *.DFM}
// --------------------------------------------------------------------------
procedure TForm1.FormCreate(Sender: TObject);
begin
if jInitialize = false then
begin
ShowMessage(ERR00);
halt;
end;
EUC := EUCSRC;
end;
// --------------------------------------------------------------------------
procedure DrawIt(_dest: HDC; _size: byte);
begin
Form1.Canvas.Brush.Color := clWhite;
Form1.Canvas.MoveTo(0, 0);
jWriteSJS(100, 10, _size, _size,
'SJS - ô·û{îΩüyé╔é┘é±é▓üz', false, false, _dest);
jWriteEUC(100, 12 + _size, _size, _size,
'EUC - ' + EUC, false, true, _dest);
end;
// --------------------------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
begin
DrawIt(Form1.Canvas.Handle, 16);
end;
// --------------------------------------------------------------------------
procedure TForm1.Button2Click(Sender: TObject);
begin
Printer.BeginDoc;
DrawIt(Printer.Canvas.Handle, (Printer.PageWidth * 16) div 640);
Printer.EndDoc;
end;
// --------------------------------------------------------------------------
end.