How to move internet explorer toolbar, address bar and links bar
-
Hi All, What I am trying to do is, when a button is pressed in my application, it opens a browser that looks very similiar to the Windows XP F11 Theatre view except that it has the menu and the status bar would be down the bottom. To this end I thought I would a IWebBrowser2 object, find the applicable toolbars in the rebar control and move them to where I want them to go. Here is what I have so far: HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (void**)&m_pWebBrowser2); hr = m_pWebBrowser2->QueryInterface(IID_IWebBrowserApp,(void**)&m_pIEApp); long hIE; // get a window handle so we can resize and show the browser window. hr = m_pWebBrowser2->get_HWND(&hIE); hr = m_pWebBrowser2->put_AddressBar(true); hr = m_pWebBrowser2->put_StatusBar(true); hr = m_pWebBrowser2->put_MenuBar(true); hr = m_pWebBrowser2->put_ToolBar(true); // use CWnd to make showing the window etc easy m_wndWebBrowser.Attach((HWND)hIE); m_wndWebBrowser.ShowWindow(SW_SHOWMAXIMIZED); //REBAR CONTROL //Find Rebar Control CWnd* workerWnd; CWnd* rebarWnd; bool foundPersonalBar = false; long childcount = 0; UINT searchState = GW_CHILD; while(!foundPersonalBar) { workerWnd = m_wndWebBrowser.GetWindow(searchState); searchState = GW_HWNDNEXT; childcount = workerWnd->GetWindowedChildCount(); if(childcount != 1) continue; rebarWnd = workerWnd->GetTopWindow(); if(!rebarWnd) continue; childcount = rebarWnd->GetWindowedChildCount(); if(childcount <= 3) continue; foundPersonalBar = true; } At this point rebarWnd is the rebar that I need (ie. the parent to the toolbar, menubar, etc) but I am not sure where to go from here. The problems I am finding are: - I cannot determine which of the child toolbars is the address bar, which is the menu bar, etc, etc - How to move them This will probably be a very easy thing to do but I am fairly inexperienced in this kind of programming. Any help would be appreciated.