SendMessage用法问题
#include "stdafx.h"#include "windows.h"#pragma comment(lib,"user32.lib")int _tmain(int argc, _TCHAR* argv[]){ HWND hWnd = FindWindow(NULL, _T("xxyy.txt - 记事本")); if (hWnd != NULL) { printf("%s\n", "11111111111"); SendMessage(hWnd, WM_KEYDOWN, VK_TAB, 0); // 消息1 } printf("%s\n", "2222222222222222"); return 0;}