Home > Software engineering >  MFC to open another process in the process of a modal dialog box
MFC to open another process in the process of a modal dialog box

Time:05-14

There are two processes A and B, B can by clicking on the button in the form of opening A modal dialog box C,

Process creates the child B now, there is A button in the interface of A, want to click on this button, open the modal dialog box C,

How to do?

CodePudding user response:

Not sendmessage, only is window HWND ah

CodePudding user response:

For (tabs=0; Tabs{
# ifdef USE_SendInput//SendInput
//key down
Input [0]. Ki. DwFlags=input [1]. The ki. DwFlags=0;
SendInput (1, & amp; Input [0], sizeof (input));//VK_CONTROL
SendInput (1, & amp; Input [1], sizeof (input));//VKTAB
//key up
Input [0]. Ki. DwFlags=input [1]. The ki. DwFlags=KEYEVENTF_KEYUP;
SendInput (1, & amp; Input [1], sizeof (input));//VK_TAB
SendInput (1, & amp; Input [0], sizeof (input));//VK_CONTROL
# the else
//keybd_event
Keybd_event (VK_CONTROL, 0, 0, 0).
Keybd_event (VK_TAB, 0, 0, 0).
Keybd_event (KEYEVENTF_KEYUP VK_TAB, 0, 0);
Keybd_event (KEYEVENTF_KEYUP VK_CONTROL, 0, 0);
# endif
}
  • Related