displaying dialog in MDIParent when it's loaded
-
Hi, I created a MFC doc/view application. 1. When the main window( the mdi ) is loaded it displays a empty chiled form. I don't want it to display anything. 2.Now I have dialog which i want to dock along the bottom of the parent window when it's displayed. I am really enw and have done readings and stuff onlien but nothing seem to point in right direction. Any pointers towards this? Any help is appreciated Thanks
-
Hi, I created a MFC doc/view application. 1. When the main window( the mdi ) is loaded it displays a empty chiled form. I don't want it to display anything. 2.Now I have dialog which i want to dock along the bottom of the parent window when it's displayed. I am really enw and have done readings and stuff onlien but nothing seem to point in right direction. Any pointers towards this? Any help is appreciated Thanks
hi ven, for this approach follow this steps you will get. 1) in OnInitialUpdate(...) of the MDI Form call a SendMessage(...,Functionname(...))/PostMessage(...,Functionname(...)) in the FunctionName(...) initiate the Dialog Dlgname d; d.DoModel(...); thats it! you will get Cheers and You will get it. good luck.. uday. uday kiran
-
Hi, I created a MFC doc/view application. 1. When the main window( the mdi ) is loaded it displays a empty chiled form. I don't want it to display anything. 2.Now I have dialog which i want to dock along the bottom of the parent window when it's displayed. I am really enw and have done readings and stuff onlien but nothing seem to point in right direction. Any pointers towards this? Any help is appreciated Thanks
-
Hi, Add cmdInfo.m_nShellCommand =CCommandLineInfo::FileNothing; in Initinstance(). Bye, Cool Ju :cool: Dream Ur Destiny
-
hi ven, for this approach follow this steps you will get. 1) in OnInitialUpdate(...) of the MDI Form call a SendMessage(...,Functionname(...))/PostMessage(...,Functionname(...)) in the FunctionName(...) initiate the Dialog Dlgname d; d.DoModel(...); thats it! you will get Cheers and You will get it. good luck.. uday. uday kiran
-
I did that man. here is the problem first if i get rid of the startup child form, the CGUIView OnInitialUpdate does not even get called, so that code do nothing. Second i have no idea how to use SendMessage but this is what i did: void CQCProGUIView::OnInitialUpdate( ) { LoadLaunchBar( ); } int CQCProGUIView::LoadLaunchBar( ) { m_launchbar = new CLaunchBar( ); m_launchbar->DoModal( ); return 0; } now this what this does is basically the application runs, but i don't seee anything at all( not even main MDi form ). if i replace that with: m_launchbar->ShowWindow( SW_NORMAL); the following assertion fails: BOOL CWnd::ShowWindow(int nCmdShow) { ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); if (m_pCtrlSite == NULL) return ::ShowWindow(m_hWnd, nCmdShow); else return m_pCtrlSite->ShowWindow(nCmdShow); } :confused:
-
hey thanks cool ju, that FileNothign worked like a charm. am still trying to show up the dialog thou
-
Hi, Instead of Dialog use a DialogBar which can be docked like a toolbar. Create the dialog bar in MainFrm::OnCreate() function and dock it where ever you want. Adios, Cool Ju :cool: Dream Ur Destiny
-
how do you dock, actually I am using a dialog bar I thoguht docking was not possible , so i was doign poisitioning and sizing myself.\ how would you suggest I try docking?
Hi, You have to the dock the dialogbar using SetWindowPos() function. I suggest you to do in MainFrm class not in View class. Insert a dialog and change the style to child. Declare a CDialogbar object(eg: m_dlgbar) in MainFrm.h In MainFrm::OnCreate funtion m_dlgBar.Create(this, Id of the dialog template,CBRS_LEFT|CBRS_TOOLTIPS|CBRS_FLYBY,id of the dialog template); m_dlgBar.SetWindowPos(&m_wndStatusBar, x,y,cx,cy,SWP_NOSIZE|SWP_NOMOVE); Adios, Cool Ju :cool: Dream Ur Destiny
-
Hi, You have to the dock the dialogbar using SetWindowPos() function. I suggest you to do in MainFrm class not in View class. Insert a dialog and change the style to child. Declare a CDialogbar object(eg: m_dlgbar) in MainFrm.h In MainFrm::OnCreate funtion m_dlgBar.Create(this, Id of the dialog template,CBRS_LEFT|CBRS_TOOLTIPS|CBRS_FLYBY,id of the dialog template); m_dlgBar.SetWindowPos(&m_wndStatusBar, x,y,cx,cy,SWP_NOSIZE|SWP_NOMOVE); Adios, Cool Ju :cool: Dream Ur Destiny
A couple fo things: 1. The object was a CDialog so I changed the base class to CDialogBar 2.I used following code m_launchbar->Create( this,IDD_LAUNCHBAR,CBRS_BOTTOM ,IDD_LAUNCHBAR ); this docs the window fine at the bottom without any setting of position and size using the SetWindowPos. Now what happens is every button on the dialogbar is disabled and it took away the WinXp kind of look from the buttons too!!! Any ideas, am reading MSDN too on this. Thanks for your help , it was awesome