Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TInputDialog "Execute Fail" error.

Posted on 1997-02-22
1
Medium Priority
?
441 Views
Last Modified: 2013-12-04
I am somewhat new to windows programming.

I have a project that uses a TInputDialog instance to ask for a simple piece of information.  All worked well until about 2 weeks ago.  My resource file got corrupted and
I had to rebuild much of it.  As I recall (and in looking back at the last good copy of the resource file) there is nothing (except the includes for the inputdia.rh & inputdia.rc files) needed in the resource file for TInputDialog.

Now I receive the following error messagebox when Execute is called for the object:

"ObjectWindows Exception
 Execute fail for window Input the Date for Delete Records
 OK to resume?
 yes   no"

One other problem I just noticed (that is surely related), I get a similar error message on my call to a TPrinter object.  ("Create" fail and no window name.) -- I haven't looked closely at the TPrinter code but I'm sure it is creating a simple dialog to show print progress.

I receive no errors/warnings on compile & link.  All else seems to operate properly, even other TDialog objects I use.

Code sample:
============
My resource file contains the owl\inputdia.rh and owl\inputdia.rc includes.


#include <owl\inputdia.h>
void ReportsWnd::CmDelRecs()
{
        char high_date[12];

        TInputDialog* dialog = new TInputDialog(this, "Input            the Date for Delete Records",
           "Delete the records before and on (MM/DD/YYYY):",
           high_date, sizeof(high_date));
       
        int result = dialog->Execute();

        if (result == IDOK)
        {
        }
}
0
Comment
Question by:btenney
1 Comment
 
LVL 2

Accepted Solution

by:
costya earned 200 total points
ID: 1300023
Could it be that your resources are not bound to the exe file? Could you inadvertently delete the resource file from the project?
Try opening the resource file in Workshop and check for the input dialog and print progress dialog to be present. Check if you have overriden the item ID values for those dialogs in some of your sources.

Hope this will help.
Costya.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Integration Management Part 2

927 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