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. Understanding Debug Information Displayed

Understanding Debug Information Displayed

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestion
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.
  • J Offline
    J Offline
    jerry1211a
    wrote on last edited by
    #1

    At a breakpoint I see: m_pParent = 0x003330d60 {CMainFrame hWnd=0x00060643 {unused=???}} //// I am passing the MainFrame CWnd object into a constructor and assigning the object to m_pParent. What I want to know is what the hex values assigned to m_pParent and hWnd mean...and why the values are different? Isn't hWnd a pointer to the Windows window?? Thanks. Jerry

    S T 2 Replies Last reply
    0
    • J jerry1211a

      At a breakpoint I see: m_pParent = 0x003330d60 {CMainFrame hWnd=0x00060643 {unused=???}} //// I am passing the MainFrame CWnd object into a constructor and assigning the object to m_pParent. What I want to know is what the hex values assigned to m_pParent and hWnd mean...and why the values are different? Isn't hWnd a pointer to the Windows window?? Thanks. Jerry

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      HWND is the handle of the window, a reference that is used by Windows to keep track of open windows. m_pParent is a pointer to the CWnd object, I see no reason why they should be the same? Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      1 Reply Last reply
      0
      • J jerry1211a

        At a breakpoint I see: m_pParent = 0x003330d60 {CMainFrame hWnd=0x00060643 {unused=???}} //// I am passing the MainFrame CWnd object into a constructor and assigning the object to m_pParent. What I want to know is what the hex values assigned to m_pParent and hWnd mean...and why the values are different? Isn't hWnd a pointer to the Windows window?? Thanks. Jerry

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #3

        m_pParent is a pointer to an MFC CWnd-derived object. That object encapsulates a window and allows you to manipulate it through various methods and properties. One of those properties (member variables) is the handle to the window (hwnd), which is simply a unique id assigned by Windows to each window created. Therefore, your CWnd pointer and its hwnd value are never going to be the same. Cheers, Tom Archer - Visual C++ MVP Archer Consulting Group "So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe

        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