Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Place a dialog in another

Place a dialog in another

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sireesha_sree
    wrote on last edited by
    #1

    Hi all, Can anyone suggest how to place a dialog in an other dialog just llike placing some control in a dialog. Thanks

    H N T 4 Replies Last reply
    0
    • S sireesha_sree

      Hi all, Can anyone suggest how to place a dialog in an other dialog just llike placing some control in a dialog. Thanks

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      See Modal and Modeless Dialog Boxes (MFC)[^]


      WhiteSky


      1 Reply Last reply
      0
      • S sireesha_sree

        Hi all, Can anyone suggest how to place a dialog in an other dialog just llike placing some control in a dialog. Thanks

        N Offline
        N Offline
        nitin3
        wrote on last edited by
        #3

        LRESULT DlgProc( HWND hWnd , UINT message , WPARAM wParam , LPARAM lParam ) { switch( message ) { case WM_COMMAND : //process commnads here break ; case WM_CLOSE : ::PostQuitMessage(0); break ; } return ::DefWindowProc(hWnd , message , wParam , lParam ) ; } void CchiDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; HWND hWnd =::CreateDialog( 0 , MAKEINTRESOURCE(IDD_ABOUTBOX), this->GetSafeHwnd() , (DLGPROC)DlgProc) ; MSG msg ; while( ! GetMessage( &msg , 0 , 0 , 0 ) ) { ::TranslateMessage( &msg ) ; ::DispatchMessage( &msg ) ; }; ::ShowWindow( hWnd , SW_SHOW ) ; } else { CDialog::OnSysCommand(nID, lParam); } } //i dont know u r trying on win32 or mfc. //best wishes

        1 Reply Last reply
        0
        • S sireesha_sree

          Hi all, Can anyone suggest how to place a dialog in an other dialog just llike placing some control in a dialog. Thanks

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          can't you just browse the site ? here is an example i wrote[^]


          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

          1 Reply Last reply
          0
          • S sireesha_sree

            Hi all, Can anyone suggest how to place a dialog in an other dialog just llike placing some control in a dialog. Thanks

            N Offline
            N Offline
            nitin3
            wrote on last edited by
            #5

            //add WS_CHILD style to your child form //eithor in dialog propery (style) or by using //SetWindowLong( hWnd , GWL_STYLE , GetWindowLong( hWnd , GWL_STYLE ) | WS_CHILD ) ; //the dialog must be called modlessly

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups