我看了MSDN中的描述:If the function succeeds, the return value is the handle to the window that previously had the keyboard focus. If the hWnd parameter is invalid or the window is not attached to the calling thread's message queue, the return value is NULL. To get extended error information, call GetLastError.说有两种情况会失败:
1 hWnd parameter is invalid
2 the window is not attached to the calling thread's message queue我看了,不是第二种情况。
我想知道,什么叫“hWnd parameter is invalid ”,而且我调用GetLastError返回0.
1 hWnd parameter is invalid
2 the window is not attached to the calling thread's message queue我看了,不是第二种情况。
我想知道,什么叫“hWnd parameter is invalid ”,而且我调用GetLastError返回0.
可能是对应的window已经销毁了
如果是要返回FALSE才行