Dialog Shows on XP but not 98 and ME

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Robert L. Smith, Jr. (rlsj_at_ncNOSPAM.rr.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 17:36:28 GMT

Actually the problem is worse than that. Soon as the main
window opens under Windows-98 or -ME, the program
terminates with no reason given!

I wrote an elaborate program, using Visual-C 6.0 under
Windows-XP, where the executable runs smoothly -- though
not under the older Windows systems. After opening the
main window my program's first action is to show a modal
dialog asking for the user's definitions. This works under
XP but immediately terminates under 98 and ME.

Guessing this might be caused by some DLL library
difference, I installed Visual-C++ 6.0 on the Windows-98
system, moved the source there and recompiled. No joy.
The program still terminates immediately.

The IDE debugger reveals that the first message to the
dialogproc is Code 2: WM_DESTROY. Great! Obviously
Windows-98 hates something about this dialog. But _what_?

The dialog was created with Visual-C's resource editor. It
is invoked by

i = DialogBox(hin,MAKEINTRESOURCE(IDD_DIALOG1),hwnd,
    idiproc);

After the above executes, i contains -1, to which
GetLastError() returns zero. How informative!

This is a reverse on the usual result. Mostly code that
worked fine under Windows-98 won't run under -XP. Now the
opposite appears. Would much appreciate hearing from
anyone who has a clue.

Thanks for your attention.

Robert Smith
rlsj@nc.rr.com