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 » Dialog not created Collapse All
Subject Author Date
Anand Tripathi Nov 6, 2008 - 3:47 AM

Hi


I am creating an application. It has a dialog which is derived from CExtResizableDialog.. I am creating this dialog in my Mainfrm.cpp class.


int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)

{


....................


....................


 if (!m_wndDialogBar1.MyCreate(this, &m_cDialog, CString("Measurements"), IDD_DIALOG_TOOLS))

 {

  TRACE0("Failed to create dialogbar\n");

  return 0;      // fail to create

 }

 

 

 m_wndDialogBar1.SetBarStyle(m_wndDialogBar1.GetBarStyle()|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC);

 //m_wndDialogBar1.EnableDocking(CBRS_NOALIGN);


 //DockControlBar(&m_wndDialogBar1,AFX_IDW_DOCKBAR_BOTTOM);


}


 


where m_wndDialogBar1 is the object of CCoolDialogBar and m_cDialog is the object of MyDialog.


my problem is that i am unable to get handler of m_cDialog. and gettinf Assertion in these lines due to handler


m_wndDialogBar1.EnableDocking(CBRS_NOALIGN);


DockControlBar(&m_wndDialogBar1,AFX_IDW_DOCKBAR_BOTTOM);


plz give me some idea.


                                                                                                       thanks.

Technical Support Nov 6, 2008 - 7:06 AM

The dialog cannot be created successfully if:

1) The dialog template resource is absent or cannot be found.

2) A subclassed control in dialog properties uses the identifier of a control which is absent or removed in the dialog template resource. This is the most often case.

3) The EndDialog(), CloseWindow(), SendMessage( WM_CLOSE ), SendMessage( WM_SYSCOMMAND, SC_CLOSE ) or DestroyWindow() code is invoked for the dialog when it is being created.

4) Some un-handled exception was thrown during dialog creation.