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. ATL / WTL / STL
  4. Geting Main brower window corridnates

Geting Main brower window corridnates

Scheduled Pinned Locked Moved ATL / WTL / STL
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.
  • M Offline
    M Offline
    macattack
    wrote on last edited by
    #1

    I wish to work with the main window area in Internet Explorer and I want to get its coordinates. I have used the following: long lpl = 0, lpt = 0, lpw = 0, lph = 0; m_spWebBrowser2->get_Left(&lpl); m_spWebBrowser2->get_Top(&lpt); m_spWebBrowser2->get_Height(&lph); m_spWebBrowser2->get_Width(&lpw); then converted the client points to Windows points: int npl = 0, npt = 0, npr = 0, npb = 0; npt = (int) lpt; //top npl = (int) lpl; //left npr = (int) lpw + npl; //right npb = (int) lph + npt; //bottom m_spWebBrowser2->ClientToWindow(&npt, &npl); //top left m_spWebBrowser2->ClientToWindow(&npb, &npr); // bottom right Unfortunately this does not seem to work. First I noticed that the values returned for the top left corridnates of the window are not consistant. Everytime I open the browser they change position even though the browser opens in the same size and location. secondly, if I create a RECT out of these corridnates and pass that into a create dialog function the window created does not cover the whole area. RECT rctB = {npl, npt, npr, npb}; m_hwndDialog = m_dlgDialog.Create(NULL, rctB, lpWindowName, 0, 0, 0, NULL); m_dlgDialg.ShowWindow(SW_SHOW); Thanks in advnace

    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