Thread: Second dialog doesn't appear

  1. #1
    Registered User
    Join Date
    Aug 2004

    Unhappy Second dialog doesn't appear


    I've created a single doc project with CFormView instead of CView and get so a dialog.

    I inserted then a dialog in the project by means of Insert/Resource/Dialog.

    What should I do to make this second dialog appear on the screen when pressing , let's say, a button on the first dialog ?

    All reply will be much appreciated.



  2. #2
    Registered User
    Join Date
    Sep 2004
    Are you asking how to display a new window with the new CFormView window?

    Call something like the following from your CMainFrame class:
    	/* First get a handle to a newly created Document */
    	CMyDoc* pMyDoc = (CMyDoc*)pServerTemplate->CreateNewDocument();
    	/* Create the child frame for the Document */
    	CChildFrame* frame = (CChildFrame*)pServerTemplate->CreateNewFrame(pMyDoc,NULL);
    	/* Set the description of the window */
    	/* Update the child frame, and make it visible */
    	/* Set the text for the child frame */
    	strcpy(frame->m_szWindowTitle,"New Window");

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 02:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  4. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 02:59 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM