mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
Add SetHandle
This commit is contained in:
parent
30fcc27d68
commit
935489e0df
11
doc.md
11
doc.md
@ -51,6 +51,7 @@
|
||||
#####[IsValid](#IsValid)
|
||||
#####[SetActive](#SetActive)
|
||||
#####[GetActive](#GetActive)
|
||||
#####[SetHandle](#SetHandle)
|
||||
#####[GetHandle](#GetHandle)
|
||||
#####[GetTitle](#GetTitle)
|
||||
|
||||
@ -460,6 +461,16 @@ func main() {
|
||||
####Return:
|
||||
Returns hwnd
|
||||
|
||||
###<h3 id="SetHandle">.SetHandle()</h3>
|
||||
|
||||
Set the Window Handle
|
||||
|
||||
####Arguments:
|
||||
int
|
||||
|
||||
####Return:
|
||||
bool
|
||||
|
||||
###<h3 id="GetHandle">.GetHandle()</h3>
|
||||
|
||||
Get the Window Handle
|
||||
|
@ -582,10 +582,10 @@ func GetHandle() int {
|
||||
return ghwnd
|
||||
}
|
||||
|
||||
// func SetHandle(hwnd int) {
|
||||
// chwnd := C.uintptr(hwnd)
|
||||
// C.aSetHandle(chwnd)
|
||||
// }
|
||||
func SetHandle(hwnd int) {
|
||||
chwnd := C.uintptr(hwnd)
|
||||
C.aSetHandle(chwnd)
|
||||
}
|
||||
|
||||
func GetTitle() string {
|
||||
title := C.aGetTitle()
|
||||
|
@ -32,6 +32,11 @@ void aCloseWindow(void){
|
||||
CloseWin();
|
||||
}
|
||||
|
||||
bool aSetHandle (uintptr handle){
|
||||
bool hwnd=setHandle(handle);
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
uintptr aGetHandle(){
|
||||
uintptr hwnd=getHandle();
|
||||
return hwnd;
|
||||
|
11
zh_doc.md
11
zh_doc.md
@ -51,6 +51,7 @@
|
||||
#####[IsValid](#IsValid)
|
||||
#####[SetActive](#SetActive)
|
||||
#####[GetActive](#GetActive)
|
||||
#####[SetHandle](#SetHandle)
|
||||
#####[GetHandle](#GetHandle)
|
||||
#####[GetTitle](#GetTitle)
|
||||
|
||||
@ -473,6 +474,16 @@ func main() {
|
||||
####返回值:
|
||||
Returns hwnd
|
||||
|
||||
###<h3 id="SetHandle">.SetHandle()</h3>
|
||||
|
||||
Set the Window Handle
|
||||
|
||||
####参数:
|
||||
int
|
||||
|
||||
####返回值:
|
||||
bool
|
||||
|
||||
###<h3 id="GetHandle">.GetHandle()</h3>
|
||||
|
||||
获取窗口 Handle
|
||||
|
Loading…
Reference in New Issue
Block a user