Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » I got problem in creating a CExtControlBar containing my own dialog Collapse All
Subject Author Date
Su-taek Oh Sep 23, 2004 - 10:26 AM

I use VS .NET 2003 and Prof-UIS Freeware. I try to implement Visual Studio IDE like UI with your components. 


My code is like this :


MainFrm.h


 CExtStatusControlBar m_wndStatusBar;
 CExtToolControlBar  m_wndToolBar;
 CExtMenuControlBar  m_wndMenuBar;
 CExtControlBar   m_wndWorkspace;
 CWorkspaceDialog  m_wndWorkspaceDialog; // Derived from CExtResizableDialog and overrided OnInitDialog (AddAnchor())


======================================


MainFrm.cpp (Message map)


 ON_COMMAND_EX(IDR_MAINFRAME, OnBarCheck)
 ON_UPDATE_COMMAND_UI(IDR_MAINFRAME, OnUpdateControlBarMenu)
 ON_COMMAND_EX(ID_RESIZABLEBAR_WORKSPACE, OnBarCheck)
 ON_UPDATE_COMMAND_UI(ID_RESIZABLEBAR_WORKSPACE, OnUpdateControlBarMenu)


======================================


MainFrm.cpp (Creating control bars)


 CWinApp* pApp = ::AfxGetApp();


 g_CmdManager->ProfileSetup(pApp->m_pszProfileName, GetSafeHwnd());


 VERIFY(g_CmdManager->UpdateFromMenu(pApp->m_pszProfileName, IDR_MAINFRAME));
 VERIFY(g_CmdManager->UpdateFromMenu(pApp->m_pszProfileName, IDR_TestProfUISTYPE));


// (Creates menu, toolbar, etc.)


 m_wndWorkspace.SetInitDesiredSizeVertical(CSize(200, 400));
 m_wndWorkspace.SetInitDesiredSizeHorizontal(CSize(400, 200));
 if(!m_wndWorkspace.Create(_T("~~"), this, ID_RESIZABLEBAR_WORKSPACE)) {
  TRACE0("~~".\n");
  return -1;  // fail to create
 }


 if(!m_wndWorkspaceDialog.Create(IDD_DIALOG_WORKSPACE, &m_wndWorkspace)) {
  TRACE0("Failed to create m_wndInBarDlg\n");
  return -1;        // fail to create
 }


 m_wndWorkspaceDialog.ShowSizeGrip(FALSE);


......



 m_wndWorkspace.EnableDocking(CBRS_ALIGN_ANY);


 if(!CExtControlBar::FrameEnableDocking(this)) {
  ASSERT( FALSE );
  return -1;
 }


.... // DockEnable() menu, toolbar
 m_wndWorkspace.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 2, this, false );
 RecalcLayout();

======================================

 


It is almost like your code, but it didn’t work. I can see window, but I can’t see my own-designed dialog(IDD_DIALOG_WORKSPACE). What’s the problem?


Thanks for advance,

Su-taek Oh Sep 23, 2004 - 2:05 PM

The default dialog "visible" property of Visual C++ .Net 2003 is "false". When I turned it out and changed to "true", it worked well.


Thanks.