U: winapi Change some function parameters to pointer pass

This commit is contained in:
杨红岩 2024-08-13 12:27:15 +08:00
parent 466b925353
commit d9791d3b62

View File

@ -145,13 +145,13 @@ func OnPaint(handle types.HWND) {
// imports.Proc(def.CEF_Win_SetDraggableRegions).Call(aRGN.Instance(), uintptr(int32(len(regions))), uintptr(unsafe.Pointer(&regions[0])), uintptr(int32(len(regions)))) // imports.Proc(def.CEF_Win_SetDraggableRegions).Call(aRGN.Instance(), uintptr(int32(len(regions))), uintptr(unsafe.Pointer(&regions[0])), uintptr(int32(len(regions))))
//} //}
func EndPaint(Handle types.HWND, PS types.TagPaintStruct) types.Integer { func EndPaint(Handle types.HWND, PS *types.TagPaintStruct) types.Integer {
r1, _, _ := imports.Proc(def.CEF_Win_EndPaint).Call(uintptr(Handle), uintptr(unsafe.Pointer(&PS))) r1, _, _ := imports.Proc(def.CEF_Win_EndPaint).Call(uintptr(Handle), uintptr(unsafe.Pointer(PS)))
return types.Integer(r1) return types.Integer(r1)
} }
func BeginPaint(Handle types.HWND, PS types.TagPaintStruct) types.HDC { func BeginPaint(Handle types.HWND, PS *types.TagPaintStruct) types.HDC {
r1, _, _ := imports.Proc(def.CEF_Win_BeginPaint).Call(uintptr(Handle), uintptr(unsafe.Pointer(&PS))) r1, _, _ := imports.Proc(def.CEF_Win_BeginPaint).Call(uintptr(Handle), uintptr(unsafe.Pointer(PS)))
return types.HDC(r1) return types.HDC(r1)
} }