實作的方法則要使用 Window API 中的 SetWindowLong 和 GetWindowLong,
如下:
代碼: 選擇全部
// TButton 可放置多行 caption
procedure SetMultiLineButton(abuttion: TButton);
var
ah: THandle;
begin
ah := abuttion.Handle;
SetWindowLong(ah, GWL_style, GetWindowLong(ah, GWL_style) OR BS_MULTILINE);
end;