请问
   发送一个模拟键盘操作  ALT+D  的消息分几步?(用sendMessage或PostMessage)
我快疯掉了。
谢谢各位兄弟了。

解决方案 »

  1.   

    http://topic.csdn.net/t/20040407/15/2936393.html
      

  2.   

    写事件的方法在我这里不行啊,我是要给另一个EXE发送这个命令的
      

  3.   

    是不是模拟键盘啊?
        keybd_event(VK_MENU,0,0,0);
        keybd_event('D',0,0,0);    keybd_event(65,0,KEYEVENTF_KEYUP,0);
        keybd_event('D'_MENU,0,KEYEVENTF_KEYUP,0);
      

  4.   

    keybd_event Function--------------------------------------------------------------------------------The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.Windows NT/2000/XP:This function has been superseded. Use SendInput instead.
    SyntaxVOID keybd_event(          BYTE bVk,
        BYTE bScan,
        DWORD dwFlags,
        PTR dwExtraInfo
    );
      

  5.   

    PostMessage(WM_KEYDOWN,(WPARAM)VK_MENU,(LPARAM)0x00090001);   
    PostMessage(WM_KEYDOWN,(WPARAM)VK_D,(LPARAM)0x00440001);