Newsgroups: comp.windows.ms
Path: utzoo!utgpu!watserv1!daemon
From: tom@mims-iris.waterloo.edu (Tom Haapanen)
Subject: Dialog boxes multiplying like rabbits
Message-ID: <1990Sep6.010555.25903@watserv1.waterloo.edu>
Sender: daemon@watserv1.waterloo.edu
Organization: University of Waterloo, WATMIMS Research Group
Date: Thu, 6 Sep 90 01:05:55 GMT
Lines: 21

I'm working on a medium-sized Windows application (~20,000 lines) using
SDK 2.1, and I'm running into a bizarre problem.  I have a dialog module
for opening a file; it works fine for opening an application's main data
file.  However, when I call it from another dialog box procedure (to open
an auxiliary file), it appears OK, and I can select a file no problem,
but it won't go away.  When the file dialog procedure processes the OK or
Cancel message, it never returns from the EndDialog() call!  More exactly,
it destroys the file dialog box from the screen, but immediately creates
another file dialog, and then another, until finally I get a stack overflow. 
Ctrl-Alt-Del is  the only way out --- and yet the file dialog box works fine
for the other, my main File Open call.

I've been spending hours on this, and endless reading of docs -- what could
I be doing wrong?  I'm quite sure I'm allowed to have a modal dialog box
call another modal dialog box --- that's the way Printer Setup works, too!
Where can I look?

I can send a code segment to anyone who's willing to look at it...

[ \tom haapanen --- university of waterloo --- tom@mims-iris.waterloo.edu ]
[ "i don't even know what street canada is on"               -- al capone ]
