WinAPI: SetTextCharacterExtra – 設定字元間距

//聲明:SetTextCharacterExtra( DC: HDC; {裝置環境控制代碼} CharExtra: Integer {間距(按邏輯單位); 若映射模式不是 MM_TEXT, 則舍入到最接近的像素}): Integer; {返回字元間隔的先前值; 調用失敗返回 $80000000 }//舉例:procedure TForm1.FormPaint(Sender: TObject);const str = '萬一的 Delphi 部落格';

WinAPI: SetTextJustification – 設定左右對齊

//聲明:SetTextJustification( DC: HDC; {裝置環境控制代碼} BreakExtra, {寬度} BreakCount: Integer {被分成幾份; 一般以空格為間隔}): Integer; {成功返回非 0 值; 失敗返回 0}//舉例:procedure TForm1.FormPaint(Sender: TObject);const str = 'CodeGear Delphi

WinAPI: CopyFile – 複製檔案

//聲明:CopyFile( lpExistingFileName: PChar; {源檔案} lpNewFileName: PChar; {目標檔案} bFailIfExists: BOOL {如果目標檔案存在, True: 失敗; False: 覆蓋}): BOOL;//例1:begin CopyFile('c:\BOOTLOG.TXT', 'c:\temp\BOOTLOG.TXT', True);end;//例2:var ExistFile,

WinAPI: GetCharWidth 和 GetCharWidth32 – 擷取字元寬度

//聲明:GetCharWidth( DC: HDC; {裝置環境控制代碼} FirstChar, LastChar: UINT; {範圍內的第一個和最後一個字元值} const Widths {接受每個字元寬度值的整型數組}): BOOL;GetCharWidth32( DC: HDC; {裝置環境控制代碼} FirstChar, LastChar: UINT;

WinAPI: GetCharABCWidths – 擷取 TrueType 字元的寬度資訊

//聲明:GetCharABCWidths( DC: HDC; {裝置環境控制代碼} FirstChar, LastChar: UINT; {範圍內的第一個和最後一個字元值} const ABCStructs {接受每個字元資訊的 TABC 結構數組}): BOOL;//TABC 類型是 _ABC 結構的重定義:_ABC = packed record abcA: Integer; {左間距} abcB: UINT;

WinAPI: CreateFontIndirect – 根據字型結構建立邏輯字型

//聲明:CreateFontIndirect( const p1: TLogFont {字型結構}): HFONT; {返回新字型指標}//TLogFont 是 tagLOGFONTA 結構的重定義:tagLOGFONTA = packed record lfHeight: Longint; {字型高度} lfWidth: Longint; {字型平均寬度} lfEscapement: Longint; {角度, 單位是 1/10 度}

WinAPI: CreatePenIndirect – 根據筆的參數結構建立畫筆

//聲明:CreatePenIndirect( const LogPen: TLogPen {筆結構}): HPEN; {返回筆控制代碼}//TLogPen 是 tagLOGPEN 結構的重定義: tagLOGPEN = packed record lopnStyle: UINT; {筆樣式} lopnWidth: TPoint; {筆寬; 只需要 TPoint.X} lopnColor: COLORREF;

WinAPI: PolyBezierTo – 繪製貝塞爾線(更新當前位置)

//聲明:PolyBezierTo( DC: HDC; {裝置環境控制代碼} const Points; {點數組} Count: DWORD {數組元素個數}): BOOL;//需要給 PolyBezierTo 指定起始點procedure TForm1.FormPaint(Sender: TObject);var ps: array[0..2] of TPoint;begin ps[0].X := 40; ps[0].Y := 110; ps[1].X := 80;

WinAPI: MoveToEx 與 LineTo – 繪製直線

//聲明:MoveToEx( DC: HDC; {裝置環境控制代碼} p2, p3: Integer; {座標} p4: PPoint {用於儲存 p2、p3 值的 TPoint 結構的指標}): BOOL;LineTo( DC: HDC; {裝置環境控制代碼} X, Y: Integer {直線終點座標}): BOOL;//舉例:unit Unit1;interfaceuses Windows, Messages, SysUtils,

WinAPI: Pie – 繪製餅圖

//聲明:Pie( DC: HDC; {裝置環境控制代碼} X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer {四個座標點}): BOOL;//舉例:procedure TForm1.FormPaint(Sender: TObject);const x1 = 10; y1 = 10; x2 = 200; y2 = 200; x3 = 130; y3 = 200; x4 = 160;

WinAPI: CreateHatchBrush – 建立陰影畫刷

//聲明:CreateHatchBrush( p1: Integer; {陰影樣式} p2: COLORREF {顏色值}): HBRUSH; {返回畫刷控制代碼}//p1 參數可選值:HS_HORIZONTAL = 0;HS_VERTICAL = 1; HS_FDIAGONAL = 2; HS_BDIAGONAL = 3; HS_CROSS = 4; HS_DIAGCROSS = 5; //舉例:procedure

WinAPI: Polyline – 繪製一組連續線段

//聲明:Polyline( DC: HDC; {裝置環境控制代碼} var Points; {點數組} Count: Integer {數組元素個數}): BOOL;{Polyline 與 Polygon 的參數一模一樣, 但 Polygon 能自動閉合}//繪製連續直線 Polylineprocedure TForm1.FormPaint(Sender: TObject);var ps: array[0..5] of TPoint;begin ps[0].X :=

WinAPI: PolylineTo – 繪製一組連續線段(更新當前位置)

//聲明:PolylineTo( DC: HDC; {裝置環境控制代碼} var Points; {點數組} Count: Integer {數組元素個數}): BOOL;//如果不給 PolylineTo 指定起點, 將預設 0 點位起點procedure TForm1.FormPaint(Sender: TObject);var ps: array[0..5] of TPoint;begin ps[0].X := 50; ps[0].Y := 50; ps[1

WinAPI: PolyPolygon – 繪製一組多邊形

//聲明:PolyPolygon( DC: HDC; {裝置環境控制代碼} var Points; {點數組} var nPoints;{數組, 數組元素是每個多邊形的頂點數} p4: Integer {多邊形數, 也就是 nPoints 的元素數}): BOOL;//舉例:procedure TForm1.FormPaint(Sender: TObject);var ps: array[0..9] of TPoint; pn: array[0..1] of

WinAPI: CreateBrushIndirect – 根據畫刷結構建立畫刷

//聲明:CreateBrushIndirect( const p1: TLogBrush {畫刷結構}): HBRUSH; {返回畫刷控制代碼}//TLogBrush 是 tagLOGBRUSH 結構的重定義:tagLOGBRUSH = packed record lbStyle: UINT; {畫刷風格} lbColor: COLORREF; {顏色} lbHatch: Longint; {陰影樣式}end;//lbStyle

WinAPI: PolyPolyline – 繪製多組線段

//聲明:PolyPolyline( DC: HDC; {裝置環境控制代碼} var Points; {點數組} var nPoints;{數組, 數組元素是每個組的頂點數} p4: Integer {分組數, 也就是 nPoints 的元素數}): BOOL;//舉例:procedure TForm1.FormPaint(Sender: TObject);var ps: array[0..9] of TPoint; pn: array[0..1] of

WinAPI: Arc – 繪製弧線

//聲明:Arc( DC: HDC; {裝置環境控制代碼} X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer {四個座標點}): BOOL;//舉例:procedure TForm1.FormPaint(Sender: TObject);const x1 = 10; y1 = 10; x2 = 200; y2 = 200; x3 = 130; y3 = 200; x4 = 160;

WinAPI: DrawCaption – 繪製標題列

//聲明:DrawCaption( p1: HWND; {視窗控制代碼} p2: HDC; {裝置環境控制代碼} const p3: TRect; {矩形} p4: UINT {選項}): BOOL;//p4 參數可選值:DC_ACTIVE = 1; {使用活動標題列顏色}DC_SMALLCAP = 2; {使用當前小標題列字型}DC_ICON = 4; {使用表徵圖}DC_TEXT = 8;

WinAPI: InflateRect – 改變矩形大小

//聲明:InflateRect( var lprc: TRect; {要修改的矩形} dx, dy: Integer {變化值}): BOOL;//舉例:procedure TForm1.FormPaint(Sender: TObject);var R: TRect;const s = '%d,%d,%d,%d';begin R := Rect(60, 60, 200, 150); DrawFocusRect(Canvas.Handle, R); Canvas.TextOut(

WinAPI: CreatePen – 建立畫筆

//聲明:CreatePen( Style, Width: Integer; {樣式與筆寬} Color: COLORREF {顏色}): HPEN; {返回筆控制代碼}//Style 參數可選值:PS_SOLID = 0; {實線}PS_DASH = 1; {段線; 要求筆寬//舉例:procedure TForm1.FormPaint(Sender: TObject);var PenStyle: Integer;

總頁數: 61357 1 .... 4794 4795 4796 4797 4798 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.