TInputDialog "Execute Fail" error.

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)
        {
        }
}
btenneyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

costyaCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.