Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the difference between ShowWindow and ShowWindowAsync?

Tags:

windows

winapi

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

In which situation, we need to call ShowWindowAsync?

like image 589
Adam Lee Avatar asked Mar 26 '13 12:03

Adam Lee


People also ask

What is Showwindowasync?

Sets the show state of a window without waiting for the operation to complete.


1 Answers

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.

like image 105
Arthur McKnight Avatar answered Nov 03 '22 04:11

Arthur McKnight