Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stack size question Pin
Joaquín M López Muñoz21-Jan-02 11:29
Joaquín M López Muñoz21-Jan-02 11:29 
GeneralRe: Stack size question Pin
Bill Wilson21-Jan-02 13:35
Bill Wilson21-Jan-02 13:35 
GeneralRe: Stack size question Pin
Jamie Hale22-Jan-02 6:12
Jamie Hale22-Jan-02 6:12 
QuestionListControl in Outlook-style??? Pin
Grit21-Jan-02 11:04
Grit21-Jan-02 11:04 
AnswerRe: ListControl in Outlook-style??? Pin
Matt Gullett21-Jan-02 11:17
Matt Gullett21-Jan-02 11:17 
AnswerRe: ListControl in Outlook-style??? Pin
Ernest Laurentin21-Jan-02 14:41
Ernest Laurentin21-Jan-02 14:41 
GeneralDialog boxes and Documents Pin
ed121-Jan-02 10:42
ed121-Jan-02 10:42 
GeneralRe: Dialog boxes and Documents Pin
Joaquín M López Muñoz21-Jan-02 11:24
Joaquín M López Muñoz21-Jan-02 11:24 
Dialog boxes do not have a GetDocument function, because they're not normally part of the document/view architecture.
As for modal/modeless dialogs, which one to use will depend on your needs: modal dialogs, when started with DoModal, block the rest of the program so that the user can only interact with the dialog until s/he presses "OK" or "Cancel" (the rest of the windows appear disabled and grayed out). Modeless dialogs, on the contrary, coexist with the rest of the app and do not block user input to other windows.
I'd say modal dialogs are simpler to handle for a starter. The way to incorporate a modal dialog into your document/view app could be sketched along these lines:
  1. Let the MFC wizard create a CDialog-based class for your use, and add a CYourDocument * variable that gets initialized on construction time: you will have to add an extra parameter to the constructor of your class, just like this:
    CYourDlg(CYourDocument * pDoc,CWnd* pParent = NULL);

  2. The dialog normally will pop up on response to some command: add a command handler for it, and show the dialog as follows:
    void CYourFrameWnd::CYourCommand()
    {
      CYourDialog dlg(GetDocument());
      dlg.DoModal(); 
    }
This way you have access to the document from within the code of your CDialog-based class. Hope the explanation has shed some light. The topic is much too broad to give but a small indication to get you started.


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Dialog boxes and Documents Pin
Braulio Dez21-Jan-02 20:59
Braulio Dez21-Jan-02 20:59 
GeneralRe: VirtualAlloc...? Pin
Joaquín M López Muñoz21-Jan-02 11:03
Joaquín M López Muñoz21-Jan-02 11:03 
GeneralMFC: passing structs from one window to another Pin
User 665821-Jan-02 9:14
User 665821-Jan-02 9:14 
GeneralRe: MFC: passing structs from one window to another Pin
Joaquín M López Muñoz21-Jan-02 9:23
Joaquín M López Muñoz21-Jan-02 9:23 
GeneralRe: MFC: passing structs from one window to another Pin
User 665821-Jan-02 10:10
User 665821-Jan-02 10:10 
Generaleek, thanks to the author Pin
21-Jan-02 8:47
suss21-Jan-02 8:47 
Questionwhat does "Add an UPDATE_COMMAND_UI handler for ..." mean? Pin
DanYELL21-Jan-02 8:19
DanYELL21-Jan-02 8:19 
AnswerRe: what does "Add an UPDATE_COMMAND_UI handler for ..." mean? Pin
Joaquín M López Muñoz21-Jan-02 8:30
Joaquín M López Muñoz21-Jan-02 8:30 
General.HLP made me CRAZY ! Pin
Hadi Rezaee21-Jan-02 8:14
Hadi Rezaee21-Jan-02 8:14 
GeneralChange icon in SDI Pin
21-Jan-02 7:28
suss21-Jan-02 7:28 
GeneralRe: Change icon in SDI Pin
Joaquín M López Muñoz21-Jan-02 7:46
Joaquín M López Muñoz21-Jan-02 7:46 
GeneralOpenGL Pin
Rajveer21-Jan-02 7:11
Rajveer21-Jan-02 7:11 
QuestionSDI view that doesn't occupy the entire main frame? Pin
jonbrown21-Jan-02 7:10
jonbrown21-Jan-02 7:10 
Generalblocking mouse and keyboard hardware Pin
Kuniva21-Jan-02 6:47
Kuniva21-Jan-02 6:47 
GeneralRe: blocking mouse and keyboard hardware Pin
Jon Hulatt21-Jan-02 6:55
Jon Hulatt21-Jan-02 6:55 
QuestionCould ya'll please tell me what is wrong with this code? Pin
Ever123421-Jan-02 6:16
Ever123421-Jan-02 6:16 
AnswerRe: Could ya'll please tell me what is wrong with this code? Pin
Rick York21-Jan-02 6:23
mveRick York21-Jan-02 6:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.