VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) 65 0X41 A 66 0x42 B 67 0x43 C 68 0x44 D 69 0x45 E 70 0x46 F 71 0x47 G 72 0x48 H 73 0x49 I 74 0x4A J 75 0x4B K 76 0x4C L 77 0x4D M 78 0x4E N 79 0x4F O 80 0x50 P 81 0x51 Q 82 0x52 R 83 0x53 S 84 0x54 T 85 0x55 U 86 0x56 V 87 0x57 W 88 0x58 X 89 0x59 Y 90 0x5A Z // 模拟ctrl+S组合键 ::SendMessage(hWndOpenExecl,WM_SETFOCUS,0,0); keybd_event(VK_LCONTROL,0,0,0); keybd_event('S',0,0,0); keybd_event('S',0,KEYEVENTF_KEYUP,0); keybd_event(VK_LCONTROL,0,KEYEVENTF_KEYUP,0); //组合键第二种方式 ::PostMessage(hWndOpenExecl,WM_SYSKEYDOWN,0x46,1<<29);ALT+f ::PostMessage(hWndOpenExecl,WM_SYSKEYDOWN,0x53,0); //S //发送鼠标消息 ::PostMessage(hWndyes,WM_LBUTTONDOWN,0,0); ::PostMessage(hWndyes,WM_LBUTTONUP,0,0); //发送回车键消息 ::PostMessage(hWndMessExecOK,WM_SYSKEYDOWN,VK_RETURN,0);