在线请教:关于DRAWTEXTEX 函数

csdndatura csdndatura 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
API函数申明和类型定义就不写了,以下是我的调用代码,但是在矩形中就是写不出字,
Private Sub Command1_Click()
Dim DrawRect As RECT
Dim FillName As String
Dim DrawPoint As DRAWTEXTPARAMS
Dim result As Long


DrawRect.Bottom = 70
DrawRect.Left = 80
DrawRect.Right = 200
DrawRect.Top = 10

Call FrameRect(Picture1.hdc, DrawRect, lPen)

FillName = "How are you!"

DrawPoint.cbSize = 5
DrawPoint.iLeftMargin = 1
DrawPoint.iRightMargin = 1
DrawPoint.iTabLength = 0
DrawPoint.uiLengthDrawn = Len(FillName)

Call DrawTextEx(Picture1.hdc, FillName, Len(FillName), DrawRect, DT_CENTER, DrawPoint)

End Sub
...全文
评论 3
收藏 已收藏
分享
返回顶部
csdndatura
API 1,488 成员 23,270 内容