JC> I _seriously_ doubt that you want a modeless dialog to be an
JC> automatic variable - the dialog is going to be destroyed on command,
JC> not when you leave whatever scope this code happens to be in.
Quite right.
JC> void CStuffView::OnDialog()
JC> {
JC> modeless *dlg = new modeless;
JC>
JC> if ( !dlg->Create(MODELESS)) {
JC> AfxMessageBox("Unable to create dialog.", MB_OK);
JC> PostQuitMessage(1);
JC> }
JC> }
Very nice, and right to the point. This may be elementary but am I
correct in assumming that your class was called "modeless" and the
template (that thing you created in the screen painter) was called
"MODELESS"? If I'm right, then I think that I've got it.
JC> ...it almost sounds like your MFC header might have somehow
JC> gotten the prototype for one version of CDialog::Create deleted
JC> from the file so the compiler no longer sees it.
I think that I got screwed up by the example in the on-line docs.
Maybe "turned around back-asswards" is a more apt definition.
JC> However, it's hard to believe that a header could be munged
JC> and only affect one prototype unless this happened by operator error.
Oh no... not that! However, I reserve the privaledge of reporting
back that there WAS something messed-up in the compiler. I've never
looked forward to using version n.0 of anything, by anybody. I can't
make special allowances for MSVC++ version 5.0. Thanks for help... I
feel like I can now fight my way ahead.
BTW, I've run into an interesting phenomona; can you tell me if
there's some sort of "standard" covering this? Say on the screen there
are two dialog boxes, one modal and one modeless. If the focus is on a
field in the modal dialog box, should you be able to _close_ the
modeless box? Nothing else, just close it. Just thinking about it, I
would say NEVER, NO WAY. But then again...
* KWQ/2 1.2i *
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)
|