mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 07:33:55 +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
|
||||
#elif defined(IS_WINDOWS)
|
||||
HWND HWnd; // Handle to a window HWND
|
||||
TCHAR Title[512];
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -27,6 +28,7 @@ typedef struct _MData MData;
|
||||
|
||||
MData mData;
|
||||
|
||||
|
||||
bool setHandle(uintptr handle);
|
||||
bool IsValid();
|
||||
bool IsAxEnabled(bool options);
|
||||
@ -857,9 +859,7 @@ char *GetTitle(){
|
||||
|
||||
#elif defined(IS_WINDOWS)
|
||||
|
||||
TCHAR name[512];
|
||||
return GetWindowText
|
||||
(mData.HWnd, name, 512) > 0 ? name : "null";
|
||||
return GetWindowText(mData.HWnd, mData.Title, 512) > 0 ? mData.Title : "null";
|
||||
// return GetWindowText
|
||||
// (mData.HWnd, name, 512) > 0 ?
|
||||
// _UTF8Encode (name) : "null";
|
||||
|
Loading…
Reference in New Issue
Block a user