Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Window's API errors Pin
Christian Graus29-Oct-01 9:20
protectorChristian Graus29-Oct-01 9:20 
GeneralRe: Window's API errors Pin
Michael P Butler29-Oct-01 9:20
Michael P Butler29-Oct-01 9:20 
GeneralAccess 2000, DAO version ... Pin
Hadi Rezaee29-Oct-01 7:55
Hadi Rezaee29-Oct-01 7:55 
GeneralRe: Access 2000, DAO version ... Pin
Carlos Antollini29-Oct-01 8:51
Carlos Antollini29-Oct-01 8:51 
GeneralRe: Access 2000, DAO version ... Pin
Steen Krogsgaard29-Oct-01 22:37
Steen Krogsgaard29-Oct-01 22:37 
GeneralRe: Access 2000, DAO version ... Pin
Steen Krogsgaard29-Oct-01 22:37
Steen Krogsgaard29-Oct-01 22:37 
GeneralDebug assertion failed getting itemtext from listview Pin
Kuniva29-Oct-01 7:28
Kuniva29-Oct-01 7:28 
GeneralRe: Debug assertion failed getting itemtext from listview Pin
J Patel29-Oct-01 7:56
J Patel29-Oct-01 7:56 
You are checking the value after the dialog has been destroyed hence all child controls are also destroyed. GetItemText does a SendMessage to the hWnd of the ListControl which no longer exists hence you get the assertion.

Save the value on the OnOK handler of the dialog to a CString member variable and then you'll be fine.

<br />
// In dialog<br />
CMyDlg::OnOK()<br />
{<br />
  m_strData = m_MyListControl.GetItemText(0,1);<br />
}<br />
<br />
<br />
// modified Original code<br />
CMyDlg dlg;<br />
m_pMainWnd = &dlg;<br />
int nResponse = dlg.DoModal();<br />
if (nResponse == IDOK)<br />
{<br />
CString Data = dlg.m_strData;<br />
}<br />
<br />


HTH

Jignesh
GeneralRe: Debug assertion failed getting itemtext from listview Pin
Alvaro Mendez29-Oct-01 9:45
Alvaro Mendez29-Oct-01 9:45 
GeneralRe: Debug assertion failed getting itemtext from listview Pin
J Patel29-Oct-01 7:57
J Patel29-Oct-01 7:57 
GeneralON_EVENT Pin
29-Oct-01 6:46
suss29-Oct-01 6:46 
GeneralPainting an icon into bitmap Pin
krausest29-Oct-01 5:57
krausest29-Oct-01 5:57 
Generalgetting listview item text Pin
Kuniva29-Oct-01 5:56
Kuniva29-Oct-01 5:56 
GeneralRe: getting listview item text Pin
Carlos Antollini29-Oct-01 6:09
Carlos Antollini29-Oct-01 6:09 
Questionc++ forums/contacts and help? Pin
CrazyJim29-Oct-01 5:37
CrazyJim29-Oct-01 5:37 
AnswerRe: c++ forums/contacts and help? Pin
Carlos Antollini29-Oct-01 5:50
Carlos Antollini29-Oct-01 5:50 
GeneralRe: c++ forums/contacts and help? Pin
CrazyJim29-Oct-01 7:39
CrazyJim29-Oct-01 7:39 
GeneralRe: c++ forums/contacts and help? Pin
Carlos Antollini29-Oct-01 7:51
Carlos Antollini29-Oct-01 7:51 
GeneralRe: c++ forums/contacts and help? Pin
Tomasz Sowinski29-Oct-01 9:32
Tomasz Sowinski29-Oct-01 9:32 
AnswerRe: c++ forums/contacts and help? Pin
Rassman30-Oct-01 3:12
Rassman30-Oct-01 3:12 
Generalcreating a special window Pin
29-Oct-01 5:34
suss29-Oct-01 5:34 
GeneralRe: creating a special window Pin
Carlos Antollini29-Oct-01 5:56
Carlos Antollini29-Oct-01 5:56 
GeneralRe: creating a special window Pin
29-Oct-01 7:07
suss29-Oct-01 7:07 
GeneralRe: creating a special window Pin
Carlos Antollini29-Oct-01 7:15
Carlos Antollini29-Oct-01 7:15 
GeneralDirectShow - non-VFW Video Capture - desperate need Pin
#realJSOP29-Oct-01 5:21
professional#realJSOP29-Oct-01 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.