Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to move internet explorer toolbar, address bar and links bar

How to move internet explorer toolbar, address bar and links bar

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dan Neilsen
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups