Add SetHandle

This commit is contained in:
vCaesar 2016-11-28 20:41:15 +08:00
parent 30fcc27d68
commit 935489e0df
4 changed files with 31 additions and 4 deletions

11
doc.md
View File

@ -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

View File

@ -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()

View File

@ -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;

View File

@ -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