GetTextMetrics怎么用?(50分)

S

suduan

Unregistered / Unconfirmed
GUEST, unregistred user!
RT~~~~~~~~~~~~~~`
 
The GetTextMetrics function fills the specified buffer with the metrics for the currently selected font.
BOOL GetTextMetrics(
HDC hdc, // handle of device context
LPTEXTMETRIC lptm // address of text metrics structure
);

Parameters
hdc
Identifies the device context.
lptm
Points to the TEXTMETRIC structure that is to receive the metrics.

Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
 
var
tm:TEXTMETRIC;
begin
GetTextMetrics(Printer.Handle,tm);
end;
对吗?但为何每次的tm的结果都不变呢?
 
但我改变字体,tm的值都是不变的
 
顶部