Using ShellExecute, I can open specify file then i get a system dialog like this:
Can I use the code to activate to the 3rd tab? (something like sendkey (ctrl+tab))?
the reason is i want to open this button:
Update: I used the code from this post, however it doesn't work :
void SendKey(HWND hWndTargetWindow, BYTE virtualKey)
{
keybd_event(virtualKey, 0, 0, 0);
keybd_event(virtualKey, 0, KEYEVENTF_KEYUP, 0);
}
ShellExecute(0, 0, L"myfile.xxx", 0, 0, SW_SHOW);
HWND mywindow = FindWindow(0,L"caption.xxx");
//SetForegroundWindow(mywindow );
std::this_thread::sleep_for(std::chrono::milliseconds(500));
SendKey(mywindow , VK_CONTROL);
SendKey(mywindow , VK_TAB);
but this work, :
ShellExecute(0, 0, L"myfile.xxx", 0, 0, SW_SHOW);
HWND mywindow = FindWindow(0,L"caption.xxx");
//SetForegroundWindow(mywindow );
std::this_thread::sleep_for(std::chrono::milliseconds(500));
SendKey(mywindow , 'A');
SendKey(mywindow , 'B');
Did I miss something?