update clipmessage

master
兔子 9 months ago
parent f7baa82534
commit f10bafb4e8

@ -339,6 +339,20 @@ func CreateWindowEx(dwExStyle DWORD, lpClassName, lpWindowName string, dwStyle D
return HWND(r), nil return HWND(r), nil
} }
func DestoryWindow(hWnd HWND) (bool, error) {
user32, err := syscall.LoadLibrary("user32.dll")
if err != nil {
return false, errors.New("Can't Load User32 API")
}
defer syscall.FreeLibrary(user32)
dw, err := syscall.GetProcAddress(syscall.Handle(user32), "DestroyWindow")
if err != nil {
return false, errors.New("Can't Load DestroyWindow API")
}
r, _, _ := syscall.Syscall(dw, 1, uintptr(hWnd), 0, 0)
return r != 0, nil
}
func GetMessage(lpMsg *MSG, hWnd HWND, wMsgFilterMin, wMsgFilterMax DWORD) (DWORD, error) { func GetMessage(lpMsg *MSG, hWnd HWND, wMsgFilterMin, wMsgFilterMax DWORD) (DWORD, error) {
user32, err := syscall.LoadLibrary("user32.dll") user32, err := syscall.LoadLibrary("user32.dll")
if err != nil { if err != nil {

Loading…
Cancel
Save