How to get a webpage to the foreground ?

Hi ! I'm working with MFC and simply trying to get a specific webpage to come to the foreground to receive user input.

After receiving the handle to the webpage this is what I call:
1
2
::ShowWindow(hWindow, SW_SHOWNORMAL);
::SetForegroundWindow(hWindow);

But the thing that 'pops' up is the little 'hover over' text when you would hover over a control for a couple seconds to see more info on the button in many modern apps.

If the webpage is called "Google" what happens is that the page itself doesn't come to the foreground but rather just the hover over text "Google" and the text doesn't disappear until I would hover over another webpage.


Ideas for either mozilla or ie ?
Thanks !
I may not be getting the right handle...Here's more:
1
2
3
4
5
6
7
8
9
10
11
12
13
string sGoogle = "Google";
CWnd *pWnd  = FindWindow(NULL, TEXT( sGoogle.c_str() ) );
HWND hWindow = *pWnd;

if(!hWindow) 
{  
	//error
}
else
{
       ::ShowWindow(hWindow, SW_SHOWNORMAL);
       ::SetForegroundWindow(hWindow);
}
Last edited on
Never mind...figured it out.
For anyone wondering, I just had to have the site's name exactly as it appears in task manager.
Topic archived. No new replies allowed.