ShellExecute interrupt the windows message loop?

asked 2020-04-28T08:04:47.89+00:00
qiudm 1 Reputation point

void CtestfunDlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码

OutputDebugString(L"start#############\r\n");

ShellExecute(NULL ,L"open",L"e:/abc.txt",0,0,SW_SHOW);

OutputDebugString(L"end#############\r\n");

}
When i quickly click the button ,i think the correct output is:
start#########,end###########,start#########,end###########

But the program actual output is start#########,start#########,end###########,end###########,why?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
23,665 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2020-04-29T08:33:10.04+00:00
    Fay Wang - MSFT 5,121 Reputation points

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Currently, Microsoft Q&A is under a public preview. All the supported topics are on the right top. Your question is more related to c++. It is recommended that you can go to this forum to ask this question.

    Thanks.

    No comments