hot to set printer.canvas rectangle ??

HI, I'm using D2, W95 and want to print the contents of a Richedit using
its 'Print' method.  But, I want it to have margins.  So I put printers
in the USES and tried:

  prtRect : TRect;
  prtRect := Rect(100,100,500,600);
  SendMessage(printer.canvas.Handle, EM_SETRECT,0,longint(@prtRect));

Tha app compiles OK, but when I push the print button, I get the error:

"Printer is not currently printing"

I must be missing something pretty basic.  Does anyone see the problem?

Or, another way to print a richedit and have margins?

Thanks for any info,
Glenn Galbraith