var
sDrv: Pchar;
sPrt: Pchar;
DevAdr: THandle;
p: PDeviceModeA;
begin
sdrv := allocmem(256);
sprt := allocmem(64);
devadr := 0;
try
printer.GetPrinter(sdrv, sdrv, sprt, devadr);
p := ptr(devadr);
p^.dmFields := DM_PAPERSIZE;
p^.dmLogPixels:=300;
// p^.dmLogPixels
// ShowMessage(IntToStr(p^.dmLogPixels));
//ShowMessage(IntToStr(p^.dmPelsHeight));
// printer.SetPrinter(sdrv, sdrv, sprt, devadr);
do
cumentProperties(0, printer.handle, sdrv, p^, p^,
DM_IN_BUFFER);
finally
freemem(sdrv, 256);
freemem(sprt, 64);
end;
end;
怎样用setprinter将改动存回去啊?