Posted on 1998-06-11
Note: This is a 16-bit app. In AppStudio I created a dialog box that looks like a common open file dialog but has some extra controls. The class that handles this dialog is derived from the CFileDialog class. The problem is this, when CFileDialog::OnOK() is called from my ::OnOK() member function, the dialog does not disappear. However, CFileDialog::OnCancel() does cause the dialog to disappear. Here's something strange: if I use CDialog::OnOK() the dialog disappears like expected. There is one problem though, eventually Win95 runs out of "16-bit" memory and no more common dialogs will display, not only my app, but any 16-bit apps. The ::DoModal() function returns a CDERR_MEMALLOCFAILURE error. Any clues as to why CFileDialog::OnOK() does not work and why CDialog::OnOK() is not cleaning up properly??