Adam Lee
Adam Lee

Reputation: 25738

what's the difference between ShowWindow and ShowWindowAsync?

I am wondering what's the difference between those two Windows API method?

In which situation, we need to call ShowWindowAsync?

Upvotes: 8

Views: 5208

Answers (1)

Arthur McKnight
Arthur McKnight

Reputation: 309

ShowWindow() sets the visibility state of a window created by the calling thread, ShowWindowAsync() is used when the calling thread did not create the window.

You would need to use ShowWindowAsync() in a multithreaded application when changing the visibility state of a window from a different thread.

Upvotes: 3

Related Questions