DrawEdge

DrawEdge,Windows API函式,用來畫一個矩形,可以指定矩形的框線樣式,比Rectangle畫出來的更花哨一點。另有微軟基礎類庫中CDC類別的同名成員方法,其功能類似。

基本介紹

  • 中文名:DrawEdge
  • 外文名:DrawEdge
  • 聲明位置:WinUser.h
函式原型,參數說明,返回值,

函式原型

BOOL DrawEdge( HDC hdc, LPRECT qrc, UINT edge, UINT grfFlags);

參數說明

可選參數
作用
BDR_RAISEDINNER
提高內邊緣
BDR_SUNKENINNER
塌陷內邊緣
BDR_RAISEDOUTER
提高外邊緣
BDR_SUNKENOUTER
塌陷外邊緣
EDGE_ETCHED
相當於BDR_SUNKENOUTER | BDR_RAISEDINNER.
EDGE_RAISED
相當於BDR_RAISEDOUTER | BDR_RAISEDINNER
EDGE_SUNKEN
相當於 BDR_SUNKENOUTER | BDR_SUNKENINNER 畫出來的矩形有3D風格
grfFlags 指定如何繪製這個矩形
可選值
作用
BF_ADJUST
Rectangle to be adjusted to leave space for client area.
BF_BOTTOM
Bottom of border rectangle.
BF_BOTTOMRIGHT
Bottom and right side of border rectangle.
BF_DIAGONAL
Diagonal border.
BF_DIAGONAL_ENDBOTTOMLEFT
Diagonal border. The end point is the bottom left corner of the rectangle; the origin is the top right corner.
BF_DIAGONAL_ENDBOTTOMRIGHT
Diagonal border.
The end point is the bottom right corner of the rectangle; the origin is top left corner.
BF_DIAGONAL_ENDTOPLEFT
Diagonal border.
The end point is the top left corner of the rectangle; the origin is bottom right corner.
BF_DIAGONAL_ENDTOPRIGHT
Diagonal border.
The end point is the top right corner of the rectangle; the origin is bottom left corner.
BF_FLAT
Flat border.
BF_LEFT
Left side of border rectangle.
BF_MIDDLE
Interior of rectangle to be filled.
BF_MONO
One-dimensional border.
BF_RECT
Entire border rectangle,一般選這個,繪製一個完整的矩形
BF_RIGHT
Right side of border rectangle.
BF_SOFT
Soft buttons instead of tiles.
BF_TOP
Top of border rectangle.

返回值

成功為true,失敗為false,調用GetLastError可以獲取失敗詳情

相關詞條

熱門詞條

聯絡我們