Second dialog doesn't appear

This is a discussion on Second dialog doesn't appear within the Windows Programming forums, part of the Platform Specific Boards category; Hello: I've created a single doc project with CFormView instead of CView and get so a dialog. I inserted then ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    37

    Unhappy Second dialog doesn't appear

    Hello:

    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.

    Thanks.

    Frandy

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    Are you asking how to display a new window with the new CFormView window?

    Call something like the following from your CMainFrame class:
    Code:
    	/* 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 */
    	frame->SetWindowDescription("window");
    	/* Update the child frame, and make it visible */
    	pServerTemplate->InitialUpdateFrame(frame,pMyDoc,true);
    	/* 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, 03:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 03: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, 03:59 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21