Hi i am getting an assertion in debug mode but not in Release mode while calling SelectionGetFirstRowInColumn(0)
I am pasting my code please tell me what can be the possible cause of this assertion?
unsigned long CDRReportGrid::GetSelectedCount()
{
int nSelectionCount = 0;
int nSel = SelectionGetFirstRowInColumn(0);
while(nSel >= 0)
{
nSelectionCount++;
nSel = SelectionGetNextRowInColumn(0, nSel);
}
return nSelectionCount;
}
I am getting the assertion in the line in bold.
I am writing the call stack as well.
> AVLControlCenter.exe!CDRReportGrid::GetSelectedCount() Line 506 + 0xd C++
AVLControlCenter.exe!CMsgDockDlg::OnUpdateAck(CCmdUI * pCmdUI=0x00125618) Line 708 + 0xe C++
mfc71d.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x047472d6, unsigned int nID=109, int nCode=-1, void (void)* pfn=0x009d8863, void * pExtra=0x00125618, unsigned int nSig=61, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 162 C++
mfc71d.dll!CCmdTarget::OnCmdMsg(unsigned int nID=109, int nCode=-1, void * pExtra=0x00125618, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Line 396 + 0x27 C++
mfc71d.dll!CWnd::UpdateDialogControls(CCmdTarget * pTarget=0x047472d6, int bDisableIfNoHndler=0) Line 4471 + 0x1d C++
AVLControlCenter.exe!CMsgDockDlg::OnInitDialog() Line 465 C++
mfc71d.dll!AfxDlgProc(HWND__ * hWnd=0x000606bc, unsigned int message=272, unsigned int __formal=395018, unsigned int __formal=395018) Line 31 + 0xe C++