Click here to Skip to main content
15,886,798 members
Articles / Programming Languages / C++
Alternative
Tip/Trick

How to bring window to top with SetForegroundWindow()

Rate me:
Please Sign up or sign in to vote.
3.50/5 (2 votes)
19 Dec 2010CPOL 14.4K   2   1
At first site, you can use BOOL WINAPI ShowWindow(__in HWND hWnd,__in int nCmdShow); with SW_RESTORE in nCmdShow (msd link) and maybe it needs to activate window before (not tested :))
At first site, you can use BOOL WINAPI ShowWindow(__in HWND hWnd,__in int nCmdShow); with SW_RESTORE in nCmdShow (msd link) and maybe it needs to activate window before (not tested :))

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Belarus Belarus
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralWell, I tried ShowWindow with SW_RESTORE on another two proj... Pin
qiuchengw9-Dec-10 17:09
qiuchengw9-Dec-10 17:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.