Original Post
So I want a nice cute MFC dialog to pop up in the middle of my game. Here is the code that crashes (or at least pops up a debug assertion failure)
sFilename = g_CurrentOptions.sFileLocation;
fileDlg = new CFileDialog(TRUE,
NULL,
sFilename,
OFN_HIDEREADONLY|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST,
NULL,NULL);
and then I run fileDlg->DoModal()
if I comment out everything icluding DoModal() and just leave those top 2 lines it still gives me the assertion failure (which leads to a crash later if I ignore it) and just to be sure I entered a vaild filename instead of sFilename and that still didn''t fix the problem. Aslo if I comment out sFilename = g_CurrentOptions.sFileLocation (the reg key for the file name) it still doest work... any clues? has this happened to any of you?
Brett Lynnes
cheez_keeper@hotmail.com