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