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