home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!wupost!gumby!yale!yale.edu!jvnc.net!darwin.sura.net!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!yuma!longs.LANCE.ColoState.Edu!bb760597
- From: bb760597@longs.LANCE.ColoState.Edu ()
- Subject: OWL: MDI doesn't like TDialog-type child windows?!?
- Message-ID: <Nov17.020204.8207@yuma.ACNS.ColoState.EDU>
- Sender: news@yuma.ACNS.ColoState.EDU (News Account)
- Date: Tue, 17 Nov 1992 02:02:04 GMT
- Distribution: na
- Reply-To: bb760597@longs.LANCE.ColoState.Edu ()
- Nntp-Posting-Host: engineer.lance.colostate.edu
- Organization: Colorado State University, Fort Collins, CO 80523
- Keywords: OWL, objectwindows, MDI, dialog, TDialog
- Lines: 61
-
- I am trying to write an OWL MDI application that uses a modeless dialog
- as a child window. Unless I am doing something wrong (which is probably
- the case), it doesn't appear that MDI supports dialogs as children.
-
- I'm using the standard method of making dialog boxes...
-
- class TMyDialog : public TDialog
- {
- public:
- PTComboBox aComboBox;
- PTEdit anEdit;
-
- TMyDialog(PTWindowsObject aParent, LPSTR aResourceID);
- ~TMyDialog();
- };
-
- TMyDialog::TMyDialog(PTWindowsObject aParent, LPSTR aResourceID) :
- TDialog(aParent, aResourceID)
- {
- aComboBox = new TComboBox(this, ID_COMBO, 0);
- anEdit = new TEdit(this, ID_EDIT, 0);
- }
-
- TMyDialog::~TMyDialog()
- {
- delete aComboBox;
- delete anEdit;
- }
-
- void TMyMainWindow::MakeTheDialogChild()
- // TMyMainWindow is an inherited class of TMDIFrame
- {
- PTWindowsObject PTWndObj;
-
- // "MYDIALOG" is the Resource ID of the Dialog Box.
-
- if ((PTWndObj = GetModule()->MakeWindow(
- new TMyDialog(this, "MYDIALOG"))) != NULL)
- ShowWindow(PTWndObj->HWindow, SW_SHOW);
- else
- BWCCMessageBox(HWindow, "Can't create MyDialog",
- "DEBUG", MB_OK);
- }
-
-
-
- This segment of code works fine in a non-MDI application, but in my MDI
- program, the dialog is displayed, but does not respond to messages, mouse
- clicks, or any other user interaction. The Edit control in the dialog box
- does seem to accept text (via the TEdit::SetText function), but the
- ComboBox doesn't work at all.
-
- Comments, suggestions, and code fragments confirming or contradicting this
- would be greatly appreciated.
-
-
- --
- -------------------------------------------------------------------------------
- Blake Buhlig Colorado State University
- bb760597@longs.LANCE.ColoState.Edu Electrical/Computer Engineering
- -------------------------------------------------------------------------------
-