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. WindowFromPoint()

WindowFromPoint()

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
3 Posts 3 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.
  • _ Offline
    _ Offline
    __Cerb
    wrote on last edited by
    #1

    I'm trying to convert this VB line Dim hWndp As Long hWndp = WindowFromPoint(Pt.X - 5, Pt.Y - 5) into C++... any help please? Thanks, Mike

    D M 2 Replies Last reply
    0
    • _ __Cerb

      I'm trying to convert this VB line Dim hWndp As Long hWndp = WindowFromPoint(Pt.X - 5, Pt.Y - 5) into C++... any help please? Thanks, Mike

      D Offline
      D Offline
      DaFrawg
      wrote on last edited by
      #2

      MSDN: static CWnd* PASCAL WindowFromPoint( POINT point ); So your C++ code should be: CWnd* hWndp = WindowFromPoint( CPoint(Pt.x - 5, Pt.y - 5) );

      1 Reply Last reply
      0
      • _ __Cerb

        I'm trying to convert this VB line Dim hWndp As Long hWndp = WindowFromPoint(Pt.X - 5, Pt.Y - 5) into C++... any help please? Thanks, Mike

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        POINT Pt; // assume this is filled in...
        HWND hWndp;
        POINT Pt2 = Pt;

        Pt2.x -= 5;
        Pt2.y -= 5;

        hWndp = WindowFromPoint ( Pt2 );

        --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.

        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