关于printer和TPrinter.Create的区别 |
尚未結案
|
fangwy
中階會員 發表:99 回覆:139 積分:62 註冊:2003-09-10 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
fangwy
中階會員 發表:99 回覆:139 積分:62 註冊:2003-09-10 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
在 Printers 單元中,
{ Printer function - Replaces the Printer global variable of previous versions,
to improve smart linking (reduce exe size by 2.5k in projects that don't use
the printer). Code which assigned to the Printer global variable
must call SetPrinter instead. SetPrinter returns current printer object
and makes the new printer object the current printer. It is the caller's
responsibility to free the old printer, if appropriate. (This allows
toggling between different printer objects without destroying configuration
settings.) }
function Printer: TPrinter; ... implementation ... function Printer: TPrinter; begin if FPrinter = nil then FPrinter := TPrinter.Create; Result := FPrinter; end;--- 歡迎光臨 KTop 研究院 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |