ShellExecute interrupt the windows message loop?

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

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.
39,539 questions
0 comments No comments
{count} votes

1 answer

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

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.