Solved

TInputDialog "Execute Fail" error.

Posted on 1997-02-22
1
432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

696 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