Solved

Common dialogs

Posted on 1998-06-11
2
331 Views
Last Modified: 2013-11-20
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??
0
Comment
Question by:dlbrown051198
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1317866
Try increasing the stacksize in your module definition file. It needs to be at least 8196 and typically more. I would suggest 12K.
0
 

Author Comment

by:dlbrown051198
ID: 1317867
Wouldn't increasing the stack size just allow me to use the dialog a few more times before the memory error occured again??
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question