Re: Send message issue
Ajay,
This is where it breaks
ASSERT_VALID(mv->m_myCtrlTab.userDlg);
and goes to objcore.cpp line no 90
// check to make sure the VTable pointer is valid
ASSERT(sizeof(CObject) == sizeof(void*));
if (!AfxIsValidAddress(*(void**)pOb, sizeof(void*), FALSE))
{
TRACE(traceAppMsg, 0, "ASSERT_VALID fails with illegal vtable
pointer.\n");
if (AfxAssertFailedLine(lpszFileName, nLine))
AfxDebugBreak();
return; // quick escape
}
nicetom786@yahoo.com wrote:
Scott :
Any complex GUI looks ugly to handle.I want to know where I am going
wrong.
I did work for example that works great with Send Message for
Controls(subclassed and non subclassed) which are sitting inside the
view .But a GUI like this ........:-)
I posted this question to improve myself and your comments will
defenitely help me.
Keep commenting and correcting me.
Ajay,
Its a SDI app and its the window of list control (tab1 of tabctrl)is
null.
Ajay Kalra wrote:
In the following code that you posted, validate the window is valid:
CCView *mv = (CCView*)pFrame->GetActiveView();
ASSERT_VALID(mv);
ASSERT_VALID(&(mv->m_ListCtrlTwo));
mv->m_ListCtrlTwo.SendMessage(WM_INSERT_ITEMS,0,0);
You had mentioned that window is null. What is null? Is it mv or is it
the handle of mv->m_ListCtrlTwo that is null?
If its mv that is null, then you dont have an active view. BTW, is this
an MDI or SDI ? If its MDI, you are getting the active view
incorrectly.
---
Ajay