<<Windows XP PRO MSVC 6.0 Pentium II 866 512 MB RAM>>
I am using a richedit control in my project.
code:-------------------------------------------------------------------------
void CRichTextEdtDlg::OnChangeRichedit()
{
long top=0, bot=0;
CHARRANGE cr;
if (m_fileloaded == true)
{
m_cRichEdt.GetSel(top,bot);
//....................error is in above code.
}
}
-------------------------------------------------------------------------------
I get a First-chance exception in AerProgram.exe (NTDLL.DLL): 0xC0000005: Access Violation in the GetSel() member function.
WINCTRL4.CPP:
code:-------------------------------------------------------------------------
void CRichEditCtrl::GetSel(long& nStartChar, long& nEndChar) const
{
ASSERT:IsWindow(m_hWnd));
CHARRANGE cr;
::SendMessage(m_hWnd, EM_EXGETSEL, 0, (LPARAM)&cr);
nStartChar = cr.cpMin;
nEndChar = cr.cpMax;
}
-------------------------------------------------------------------------------
SendMessage is blowing up. Why would SendMessage Blow up in a RichEdit control?
Also could it be that I somehow have the wrong version of riched32.dll?
ahoodin
I am using a richedit control in my project.
code:-------------------------------------------------------------------------
void CRichTextEdtDlg::OnChangeRichedit()
{
long top=0, bot=0;
CHARRANGE cr;
if (m_fileloaded == true)
{
m_cRichEdt.GetSel(top,bot);
//....................error is in above code.
}
}
-------------------------------------------------------------------------------
I get a First-chance exception in AerProgram.exe (NTDLL.DLL): 0xC0000005: Access Violation in the GetSel() member function.
WINCTRL4.CPP:
code:-------------------------------------------------------------------------
void CRichEditCtrl::GetSel(long& nStartChar, long& nEndChar) const
{
ASSERT:IsWindow(m_hWnd));
CHARRANGE cr;
::SendMessage(m_hWnd, EM_EXGETSEL, 0, (LPARAM)&cr);
nStartChar = cr.cpMin;
nEndChar = cr.cpMax;
}
-------------------------------------------------------------------------------
SendMessage is blowing up. Why would SendMessage Blow up in a RichEdit control?
Also could it be that I somehow have the wrong version of riched32.dll?
ahoodin