SetFocus函数为什么调用失败?
我看了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.