How can I Fix the Crash caused due to change of User-defined message ?
-
I've a user defined message defined as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 3) the handler is : LRESULT CTreePropSheet::OnTreeItemCheckBoxClicked(WPARAM wParam, LPARAM lParam) { -- } When I modify the user defined message as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 1) //(which is unique and no other user defined message is defined so) then, there is a crash in my application. A snippet of the call stack contents looks like this : For (WM_USER + 3) : (Successful case)
TreePropSheet::CTreePropSheet::OnInitDialog() line 773
CPropertySheet::HandleInitDialog(unsigned int 460026, unsigned int 460026) line 1209 + 14 bytes
CWnd::OnWndMsg(unsigned int 272, unsigned int 460026, long 1452200, long * 0x0013f03c) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 272, unsigned int 460026, long 1452200) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x00080500}, HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 368
AfxWndProcBase(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 220 + 21 bytesFor (WM_USER + 1) : (Unsuccessful case)
TreePropSheet::CTreePropSheet::OnTreeItemCheckBoxClicked(unsigned int 1, long 0) line 1148 + 14 bytes
CWnd::OnWndMsg(unsigned int 1025, unsigned int 1, long 0, long * 0x0013e310) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 1025, unsigned int 1, long 0) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x001a0222}, HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 368
AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytesActually, in Successful case, the OnTreeItemCheckBoxClicked() is not required to be called (as is happening in Unsuccessful case) because the event (of clicking tree item) as such has not occurred at all.The crash arises before launch of my dialog (which contains the tree control) itself. Can the cause of the crash be figured out from the call stack contents ? It appears that third and fourth (or either) parameters of the following function is causing the problem AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytes Bu
-
I've a user defined message defined as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 3) the handler is : LRESULT CTreePropSheet::OnTreeItemCheckBoxClicked(WPARAM wParam, LPARAM lParam) { -- } When I modify the user defined message as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 1) //(which is unique and no other user defined message is defined so) then, there is a crash in my application. A snippet of the call stack contents looks like this : For (WM_USER + 3) : (Successful case)
TreePropSheet::CTreePropSheet::OnInitDialog() line 773
CPropertySheet::HandleInitDialog(unsigned int 460026, unsigned int 460026) line 1209 + 14 bytes
CWnd::OnWndMsg(unsigned int 272, unsigned int 460026, long 1452200, long * 0x0013f03c) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 272, unsigned int 460026, long 1452200) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x00080500}, HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 368
AfxWndProcBase(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 220 + 21 bytesFor (WM_USER + 1) : (Unsuccessful case)
TreePropSheet::CTreePropSheet::OnTreeItemCheckBoxClicked(unsigned int 1, long 0) line 1148 + 14 bytes
CWnd::OnWndMsg(unsigned int 1025, unsigned int 1, long 0, long * 0x0013e310) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 1025, unsigned int 1, long 0) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x001a0222}, HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 368
AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytesActually, in Successful case, the OnTreeItemCheckBoxClicked() is not required to be called (as is happening in Unsuccessful case) because the event (of clicking tree item) as such has not occurred at all.The crash arises before launch of my dialog (which contains the tree control) itself. Can the cause of the crash be figured out from the call stack contents ? It appears that third and fourth (or either) parameters of the following function is causing the problem AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytes Bu
-
I've a user defined message defined as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 3) the handler is : LRESULT CTreePropSheet::OnTreeItemCheckBoxClicked(WPARAM wParam, LPARAM lParam) { -- } When I modify the user defined message as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 1) //(which is unique and no other user defined message is defined so) then, there is a crash in my application. A snippet of the call stack contents looks like this : For (WM_USER + 3) : (Successful case)
TreePropSheet::CTreePropSheet::OnInitDialog() line 773
CPropertySheet::HandleInitDialog(unsigned int 460026, unsigned int 460026) line 1209 + 14 bytes
CWnd::OnWndMsg(unsigned int 272, unsigned int 460026, long 1452200, long * 0x0013f03c) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 272, unsigned int 460026, long 1452200) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x00080500}, HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 368
AfxWndProcBase(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 220 + 21 bytesFor (WM_USER + 1) : (Unsuccessful case)
TreePropSheet::CTreePropSheet::OnTreeItemCheckBoxClicked(unsigned int 1, long 0) line 1148 + 14 bytes
CWnd::OnWndMsg(unsigned int 1025, unsigned int 1, long 0, long * 0x0013e310) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 1025, unsigned int 1, long 0) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x001a0222}, HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 368
AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytesActually, in Successful case, the OnTreeItemCheckBoxClicked() is not required to be called (as is happening in Unsuccessful case) because the event (of clicking tree item) as such has not occurred at all.The crash arises before launch of my dialog (which contains the tree control) itself. Can the cause of the crash be figured out from the call stack contents ? It appears that third and fourth (or either) parameters of the following function is causing the problem AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytes Bu
-
I've a user defined message defined as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 3) the handler is : LRESULT CTreePropSheet::OnTreeItemCheckBoxClicked(WPARAM wParam, LPARAM lParam) { -- } When I modify the user defined message as : #define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 1) //(which is unique and no other user defined message is defined so) then, there is a crash in my application. A snippet of the call stack contents looks like this : For (WM_USER + 3) : (Successful case)
TreePropSheet::CTreePropSheet::OnInitDialog() line 773
CPropertySheet::HandleInitDialog(unsigned int 460026, unsigned int 460026) line 1209 + 14 bytes
CWnd::OnWndMsg(unsigned int 272, unsigned int 460026, long 1452200, long * 0x0013f03c) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 272, unsigned int 460026, long 1452200) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x00080500}, HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 368
AfxWndProcBase(HWND__ * 0x00080500, unsigned int 272, unsigned int 460026, long 1452200) line 220 + 21 bytesFor (WM_USER + 1) : (Unsuccessful case)
TreePropSheet::CTreePropSheet::OnTreeItemCheckBoxClicked(unsigned int 1, long 0) line 1148 + 14 bytes
CWnd::OnWndMsg(unsigned int 1025, unsigned int 1, long 0, long * 0x0013e310) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 1025, unsigned int 1, long 0) line 1585 + 30 bytes
AfxCallWndProc(CWnd * 0x0013f438 {TreePropSheet::CTreePropSheet hWnd=0x001a0222}, HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 368
AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytesActually, in Successful case, the OnTreeItemCheckBoxClicked() is not required to be called (as is happening in Unsuccessful case) because the event (of clicking tree item) as such has not occurred at all.The crash arises before launch of my dialog (which contains the tree control) itself. Can the cause of the crash be figured out from the call stack contents ? It appears that third and fourth (or either) parameters of the following function is causing the problem AfxWndProcBase(HWND__ * 0x001a0222, unsigned int 1025, unsigned int 1, long 0) line 220 + 21 bytes Bu
SherTeks wrote:
#define UDM_TREEITEMCHECKBOX_CLICKED (WM_USER + 1) //(which is unique and no other user defined message is defined so)
Are you 100% sure? The answer may surprise you.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch