mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-06 08:43:56 +00:00
Merge pull request #81 from wang35666/bug
go build error. getTitle gcc 7.2.0
This commit is contained in:
commit
c6fbd155f0
@ -20,6 +20,7 @@ struct _MData{
|
|||||||
Window XWin; // Handle to an X11 window
|
Window XWin; // Handle to an X11 window
|
||||||
#elif defined(IS_WINDOWS)
|
#elif defined(IS_WINDOWS)
|
||||||
HWND HWnd; // Handle to a window HWND
|
HWND HWnd; // Handle to a window HWND
|
||||||
|
TCHAR Title[512];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ typedef struct _MData MData;
|
|||||||
|
|
||||||
MData mData;
|
MData mData;
|
||||||
|
|
||||||
|
|
||||||
bool setHandle(uintptr handle);
|
bool setHandle(uintptr handle);
|
||||||
bool IsValid();
|
bool IsValid();
|
||||||
bool IsAxEnabled(bool options);
|
bool IsAxEnabled(bool options);
|
||||||
@ -857,9 +859,7 @@ char *GetTitle(){
|
|||||||
|
|
||||||
#elif defined(IS_WINDOWS)
|
#elif defined(IS_WINDOWS)
|
||||||
|
|
||||||
TCHAR name[512];
|
return GetWindowText(mData.HWnd, mData.Title, 512) > 0 ? mData.Title : "null";
|
||||||
return GetWindowText
|
|
||||||
(mData.HWnd, name, 512) > 0 ? name : "null";
|
|
||||||
// return GetWindowText
|
// return GetWindowText
|
||||||
// (mData.HWnd, name, 512) > 0 ?
|
// (mData.HWnd, name, 512) > 0 ?
|
||||||
// _UTF8Encode (name) : "null";
|
// _UTF8Encode (name) : "null";
|
||||||
|
Loading…
Reference in New Issue
Block a user