首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

SendMessage用法有关问题

2012-05-28 
SendMessage用法问题C/C++ code#include stdafx.h#include windows.h#pragma comment(lib,user32.lib

SendMessage用法问题

C/C++ code
#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;}


不知道为什么 消息1发了没有用

[解决办法]
PostMessage

热点排行