谁能给我个任意图形填色的算法,最好有例子说明一下啊,我想用VB实现图形填色。
1个回答
展开全部
Private Declare Function FillRgn Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
private sub form_load()
'有图形的话 设图形的句柄为HWND
hbrush=createsolidbrush(vbred)
FillRgn hwnd ,hbrush
end sub
就搞定了 关键你自己把图形的句柄填上去
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
private sub form_load()
'有图形的话 设图形的句柄为HWND
hbrush=createsolidbrush(vbred)
FillRgn hwnd ,hbrush
end sub
就搞定了 关键你自己把图形的句柄填上去
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询