Link to home
Start Free TrialLog in
Avatar of spikey_nick
spikey_nick

asked on

Bringing a window to the front

I'm working on a program that needs to bring an already opened IE window to the front of the screen.  I looked on the MSDN site for help.  I've tried using ShowWindow(), ShowWindowAsync(), BringWindowToTop() and SwitchToThisWindow() [which wouldn't compile].  Does anybody know of any other functions that will do this, or is there anything special that I need to do to get one of the above functions to work?
Avatar of spikey_nick
spikey_nick

ASKER

I shoud also add that I'm writing this in C++ using Visual Studio 6
SetWindowPos() works well, assumming you have the HWND handler of the window.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/setwindowpos.asp

An example:

BOOL SetWindowPos( hWnd, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial