Click here to Skip to main content
16,010,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString to LPVOID Pin
Zac Howland1-Aug-06 6:05
Zac Howland1-Aug-06 6:05 
AnswerRe: CString to LPVOID Pin
Zac Howland1-Aug-06 5:51
Zac Howland1-Aug-06 5:51 
AnswerRe: CString to LPVOID Pin
Michael Dunn1-Aug-06 19:37
sitebuilderMichael Dunn1-Aug-06 19:37 
Questioniostream.h in Visual Studio 2005 [modified] Pin
Jay031-Aug-06 5:27
Jay031-Aug-06 5:27 
AnswerRe: iostream.h in Visual Studio 2005 Pin
Zac Howland1-Aug-06 5:52
Zac Howland1-Aug-06 5:52 
AnswerRe: iostream.h in Visual Studio 2005 Pin
Sarath C1-Aug-06 6:59
Sarath C1-Aug-06 6:59 
AnswerRe: iostream.h in Visual Studio 2005 Pin
Michael Dunn1-Aug-06 19:37
sitebuilderMichael Dunn1-Aug-06 19:37 
QuestionDebug runs, Release crashes. Why? Pin
Hotte1-Aug-06 5:14
Hotte1-Aug-06 5:14 
Hi,

I've written an own FindDlg. It's derived from CDialog and just provides an own SelectionList. It crashes anywhere between CFindDlg::EndDialog(IDOK) and the calling Method. - Ain't nice but happens.Roll eyes | :rolleyes:

But the prog crashes only while executing release-build. Running debug-release don't crash. WTF | :WTF: (Memory-Exeption during read...)

So how can I fix my prog, that it runs also within release-build. Or how can I find my bug? - I don't have any Idea?

Thanks && Greets,
Horst

Calling Method ==>
  CFindDlg dlgFind;<br />
  <br />
  dlgFind.SetTreeRef(m_pobjCurrentTree);<br />
  dlgFind.DoModal();<br />
  MessageBox("You won't see me....");<br />
<br />
  // Element anzeigen<br />
  if ( ! dlgFind.GetFoundItem().IsEmpty() ) { <br />
    LVFINDINFO SearchPattern;<br />
<br />
    SelectTreeItem(dlgFind.GetFoundItem());<br />
<br />
    SearchPattern.flags = LVFI_STRING;<br />
    SearchPattern.psz = dlgFind.GetFoundItem();<br />
<br />
    m_ctrlElement.SetItemState(m_ctrlElement.FindItem(&SearchPattern), LVIS_SELECTED, LVIS_SELECTED);<br />
    m_ctrlElement.SetFocus();<br />
  }<br />
<== Calling Method

OnOK ==>
void CFindDlg::OnOK() {<br />
  int iSelectedSOC;<br />
  POSITION pListSelection = m_ctrlFoundItem.GetFirstSelectedItemPosition();<br />
<br />
  iSelectedSOC = pListSelection == NULL ? -1 : m_ctrlFoundItem.GetNextSelectedItem(pListSelection);<br />
  m_sFoundItem = iSelectedSOC == -1 ? "" : m_ctrlFoundItem.GetItemText(iSelectedSOC, 0);<br />
<br />
  MessageBox("This will be the last you will see before abort...");<br />
  EndDialog(IDOK);<br />
}<br />
<== OnOK
AnswerRe: Debug runs, Release crashes. Why? Pin
toxcct1-Aug-06 5:20
toxcct1-Aug-06 5:20 
QuestionRe: Debug runs, Release crashes. Why? Pin
David Crow1-Aug-06 5:45
David Crow1-Aug-06 5:45 
AnswerRe: Debug runs, Release crashes. Why? Pin
Zac Howland1-Aug-06 5:56
Zac Howland1-Aug-06 5:56 
QuestionSir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
CodeVarma1-Aug-06 4:40
CodeVarma1-Aug-06 4:40 
AnswerRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
toxcct1-Aug-06 4:45
toxcct1-Aug-06 4:45 
GeneralRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
Zac Howland1-Aug-06 4:55
Zac Howland1-Aug-06 4:55 
GeneralRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
toxcct1-Aug-06 4:59
toxcct1-Aug-06 4:59 
GeneralRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
Zac Howland1-Aug-06 5:11
Zac Howland1-Aug-06 5:11 
AnswerRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
Warren Stevens1-Aug-06 5:13
Warren Stevens1-Aug-06 5:13 
GeneralRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
toxcct1-Aug-06 5:19
toxcct1-Aug-06 5:19 
GeneralRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
Zac Howland1-Aug-06 5:23
Zac Howland1-Aug-06 5:23 
AnswerRe: Sir, Why Virtual Constructor doesn't exist ? Whereas we have virtual Destructor. Pin
David Crow1-Aug-06 4:56
David Crow1-Aug-06 4:56 
QuestionTab Control using 'CTabCtrl'? Pin
Andy Rama1-Aug-06 4:39
Andy Rama1-Aug-06 4:39 
AnswerRe: Tab Control using 'CTabCtrl'? Pin
Hamid_RT1-Aug-06 4:53
Hamid_RT1-Aug-06 4:53 
GeneralRe: Tab Control using 'CTabCtrl'? Pin
Andy Rama1-Aug-06 20:32
Andy Rama1-Aug-06 20:32 
GeneralRe: Tab Control using 'CTabCtrl'? Pin
Hamid_RT2-Aug-06 9:29
Hamid_RT2-Aug-06 9:29 
GeneralRe: Tab Control using 'CTabCtrl'? Pin
Andy Rama2-Aug-06 21:04
Andy Rama2-Aug-06 21:04 

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.