Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Okay. How to create ID_MENU_? Pin
ns22-Jan-03 10:25
ns22-Jan-03 10:25 
GeneralRe: Okay. How to create ID_MENU_? Pin
Joaquín M López Muñoz22-Jan-03 10:43
Joaquín M López Muñoz22-Jan-03 10:43 
QuestionHow to use VC6 libraries from VC.NET? Pin
Nemanja Trifunovic22-Jan-03 7:26
Nemanja Trifunovic22-Jan-03 7:26 
AnswerRe: How to use VC6 libraries from VC.NET? Pin
Stephane Rodriguez.22-Jan-03 8:34
Stephane Rodriguez.22-Jan-03 8:34 
GeneralRe: How to use VC6 libraries from VC.NET? Pin
Nemanja Trifunovic22-Jan-03 8:59
Nemanja Trifunovic22-Jan-03 8:59 
GeneralRe: How to use VC6 libraries from VC.NET? Pin
Stephane Rodriguez.22-Jan-03 9:04
Stephane Rodriguez.22-Jan-03 9:04 
GeneralRe: How to use VC6 libraries from VC.NET? Pin
Nemanja Trifunovic22-Jan-03 9:28
Nemanja Trifunovic22-Jan-03 9:28 
Generalrelease version crashes on exit Pin
ns22-Jan-03 6:20
ns22-Jan-03 6:20 
In my debug version, it does fine. rElease crashes on exit. Its an MFC MDI app, which spawns CDialog derived windows. These get pushed on to a vector and popped off when they are closed (they postmessage to the CView that spwaned them.). ANyways all I do is spawn one (modeless ) window, and close it. Then exit and it crashes, but only in the release version. I dont know where to start looking for the trouble. I dont rknow if the foll. helps.....

void CImageDisplay::OnClose(void) 
{
	std::vector<CImageDisplay*>::iterator itV = pImageDisplayVector.begin();

	for (int i = 0 ; i < m_imageDisplayVectorIndex ; ++i , ++itV);

	pImageDisplayVector.erase(itV);

	imageDeque.pop_back();



	m_pParentWnd->PostMessage(UDM_UPDATEDISPLAY);


	
	CDialog::OnClose();
}

Its not the pop_back because it still crashes if I comment it out.

In the function that creates the window:


CImageDisplay* pImageDisplay = new CImageDisplay();

if (pImageDisplay == NULL) return;

BOOL ret = pImageDisplay->Create(IDD_DIALOG1, this);

if(!ret)  //Create failed.
{
    AfxMessageBox("Error creating Dialog");

    delete pImageDisplay;

    return;
}

pImageDisplay->ShowWindow(SW_SHOW);


pImageDisplayVector.push_back(pImageDisplay);


imageDeque.push_back(image);

m_imageIndexHi = m_imageIndexLo + imageDeque.size() - 1;



UpdateDisplay();


image.SetRawImagePointer(0);


Appreciate your help,
ns
GeneralRe: release version crashes on exit Pin
ns22-Jan-03 6:22
ns22-Jan-03 6:22 
GeneralAdding a dynamic menu with SendMessage Pin
ns22-Jan-03 5:55
ns22-Jan-03 5:55 
QuestionOledblob.h for .NET ? Pin
Brosten22-Jan-03 5:47
Brosten22-Jan-03 5:47 
GeneralSelf Modify Exe Pin
Anthony988722-Jan-03 5:24
Anthony988722-Jan-03 5:24 
GeneralRe: Self Modify Exe Pin
Rage22-Jan-03 5:31
professionalRage22-Jan-03 5:31 
GeneralUpdateResource sample for string table Pin
zebbedi22-Jan-03 5:13
zebbedi22-Jan-03 5:13 
GeneralMemory leak in CStdioFile.. Pin
RobJones22-Jan-03 4:56
RobJones22-Jan-03 4:56 
GeneralRe: Memory leak in CStdioFile.. Pin
Gary Kirkham22-Jan-03 5:08
Gary Kirkham22-Jan-03 5:08 
GeneralRe: Memory leak in CStdioFile.. Pin
RobJones22-Jan-03 5:13
RobJones22-Jan-03 5:13 
GeneralRe: Memory leak in CStdioFile.. Pin
Gary Kirkham22-Jan-03 5:36
Gary Kirkham22-Jan-03 5:36 
GeneralRe: Memory leak in CStdioFile.. Pin
RobJones22-Jan-03 5:49
RobJones22-Jan-03 5:49 
GeneralSCP Pin
Brian Delahunty22-Jan-03 4:29
Brian Delahunty22-Jan-03 4:29 
GeneralRe: SCP Pin
Jörgen Sigvardsson23-Jan-03 10:57
Jörgen Sigvardsson23-Jan-03 10:57 
GeneralRe: SCP Pin
Brian Delahunty23-Jan-03 22:12
Brian Delahunty23-Jan-03 22:12 
GeneralPane size in splitter wnds Pin
will138322-Jan-03 4:17
will138322-Jan-03 4:17 
Generalnevermind Pin
will138322-Jan-03 5:36
will138322-Jan-03 5:36 
GeneralCreate Class Graph Pin
karl_w22-Jan-03 3:29
karl_w22-Jan-03 3:29 

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.