|
Prev: VIRUS ALERT! (was CInternetSession::OpenURL and Seek, Read)
Next: Newbee :: Question about windows service
From: JG on 16 May 2008 09:02 Oops I accidentally crossed post to vc.ide.general when I meant to post here I'm trying to create a modeless dialog as the one and only AppWindow (with MFC Visual C ) My default app comes up with an OK and CANCEL button. I delete the buttons in the resource editor but is the dialog now modeless ? Or is there more I suspect to do. And how will it handle and Esc key? Does this sort of thing have to be done without the default resource dialog (by hand ) ?
From: AliR (VC++ MVP) on 16 May 2008 10:13 The only difference between a modal and modeless dialog is that bring up a Modal dialog is a blocking call (Calling DoModal will not return until the user closes the dialog). Which means that only one modal dialog can be active at any one time, a MessageBox is a Modal dialog. But modeless is not that way, you can have as many open as you like and you can switch between them. Therefore what buttons are on the dialog has nothing to do with whether it is modeless or not. Also having a modeless dialog as the main window does not really buy you much. We might be able to help better if you can describe the end results that you are trying to accomplish. AliR. "JG" <NoMail(a)NoSpam> wrote in message news:g0k0l102p1u(a)news1.newsguy.com... > Oops I accidentally crossed post to vc.ide.general when I meant > to post here > I'm trying to create a modeless dialog as the one and only AppWindow (with > MFC Visual C ) > My default app comes up with an OK and CANCEL > button. I delete the buttons in the resource editor > but is the dialog now modeless ? Or is there more > I suspect to do. And how will it handle and Esc key? > Does this sort of thing have to be done without > the default resource dialog (by hand ) ?
From: JG on 17 May 2008 07:23 >"AliR (VC++ MVP)" replied >Therefore what buttons are on the dialog has nothing to do with whether >it is modeless or not. So if I delete the DoModal handlers (and the OK and CANCEL buttons) on the default AppWizard dialog it will still be Modal or Modeless ? >Also having a modeless dialog as the main window does not really buy you >much. Ok....... >We might be able to help better if you can describe the end results that you >are trying to accomplish. AliR. Ok you seem to be very helpful oriented which I appreciate. What I envision doing (from my amateur point of view) is a single window app with two edit boxes (and two static labels above each) with possible additions of both later on. I will retrieve input from the edit boxes and work with that. The default dialog from the AppWizard seemed to be quicker and easier than writing all the child window creations. This app will be strickly for use by myself to process data at work. Appreciate whatever input you can give me. >>---origninal post--------------- >> I'm trying to create a modeless dialog as the one and >>only AppWindow (with >> MFC Visual C ) >> My default app comes up with an OK and CANCEL >> button. I delete the buttons in the resource editor >> but is the dialog now modeless ? Or is there more >> I suspect to do. And how will it handle and Esc key? >> Does this sort of thing have to be done without >> the default resource dialog (by hand ) ?
From: Scott McPhillips [MVP] on 17 May 2008 09:22 "JG" <NoMail(a)NoSpam> wrote in message news:g0mf8706f6(a)news4.newsguy.com... > >>"AliR (VC++ MVP)" replied >>Therefore what buttons are on the dialog has nothing to do with whether it >>is modeless or not. > > So if I delete the DoModal handlers (and the OK and CANCEL buttons) > on the default AppWizard dialog it will still be Modal or Modeless ? > >>Also having a modeless dialog as the main window does not really buy you >>much. > > Ok....... > >>We might be able to help better if you can describe the end results that >>you are trying to accomplish. AliR. > > Ok you seem to be very helpful oriented which I appreciate. What I > envision > doing (from my amateur point of view) is a single window app with two > edit boxes (and two static labels above each) with possible additions of > both > later on. I will retrieve input from the edit boxes and work with that. > The > default dialog from the AppWizard seemed to be quicker and easier than > writing all the child window creations. This app will be strickly for use > by > myself to process data at work. Appreciate whatever input you can > give me. What is it about the default App Wizard app that you don't like? It seems to fit your needs from what you have said. Use the DoModal call that the wizard puts in. If you don't want the OK button then first add a message handler for OnOK. Make it an empty function. Then you can delete the button from the dialog resource. -- Scott McPhillips [VC++ MVP]
From: JG on 18 May 2008 07:27 "Scott McPhillips [MVP]" wrote in message > What is it about the default App Wizard app that you don't like? It seems > to fit your needs from what you have said. Use the DoModal call that the > wizard puts in. If you don't want the OK button then first add a message > handler for OnOK. Make it an empty function. Then you can delete the > button from the dialog resource. > Scott McPhillips [VC++ MVP] ---------------- Ok I will try this, I assume this will allow my app to continue if the Esc or Enter key is pressed ? Which by the way to answer your question is, what I don't want about the default App Wizard app.
|
Next
|
Last
Pages: 1 2 Prev: VIRUS ALERT! (was CInternetSession::OpenURL and Seek, Read) Next: Newbee :: Question about windows service |