Solved

TInputDialog "Execute Fail" error.

Posted on 1997-02-22
1
423 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 100 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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