Solved

Common dialogs

Posted on 1998-06-11
2
325 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now