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 Tech Support » VC2008 MDI Problem with 2.8.2 Collapse All
Subject Author Date
Gevork Odabashyan Jun 5, 2008 - 2:57 AM

I’m using 2.82 with VC2008.

I try MDI and MDI_DynamicBars samples.

The problem is that the MDI childs and dynamic bars

do not have their Tabs in MDI window.

With VC2003 all work correct.

Gevork Odabashyan Jun 6, 2008 - 1:41 AM

Thanks, it’s work.


It would be really helpful to have a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008 as Johnny Booth suggested.


May be it would be helpfull to open new thread for this issue?

Technical Support Jun 5, 2008 - 11:56 AM

There is a new feature introduced in MFC 9.0 and Visual Studio 2008: the IDC_STATIC constant cannot be used as the dialog control identifier of a control bar window (and other windows) which take up parts of the main frame window in the same way as control bars do. So, please modify the MDI tab window creation code in the CMainFrame::OnCreate() method:

#if (!defined __EXT_MFC_NO_TABMDI_CTRL)
      if( ! m_wndMdiTabs.Create(
                  this,
                  CRect(0,0,0,0),
                  1, // UINT(IDC_STATIC), <------------- this line was changed -------------
                  WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
                  __ETWS_MDI_DEFAULT|__ETWS_HIDE_ICONS|__ETWS_ITEM_DRAGGING
                  )
            )
      {
            ASSERT( FALSE );
            return -1;
      }
//    m_wndMdiTabs.ModifyTabWndStyleEx( 0, __ETWS_EX_CLOSE_ON_TABS, false );
#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL)



Johnny Booth Jun 5, 2008 - 11:03 AM

I had a similar issue with my MDI app when switching from VS2003 to VS2008.  Have a look at the DrawCLI sample.  Try creating your MDI tab control then modify the tab style(s) after the call to Create:


 #if (!defined __EXT_MFC_NO_TABMDI_CTRL)

    if( !m_wndMdiTabs.Create( this ) )

    {

        ASSERT( FALSE );

        return -1;

    }

    m_wndMdiTabs.ModifyTabWndStyle(

        0,

        __ETWS_ONENOTE_DEFAULT

            | __ETWS_SHOW_BTN_TAB_LIST

            | __ETWS_ENABLED_BTN_TAB_LIST

            | __ETWS_ITEM_DRAGGING

            | __ETWS_SHOW_BTN_CLOSE

        ,

        true

        );

    m_wndMdiTabs.ModifyTabWndStyleEx(

        0,

        __ETWS_EX_CLOSE_ON_TABS|__ETWS_EX_CLOSE_ON_SELECTED_ONLY

        );

#endif // (!defined __EXT_MFC_NO_TABMDI_CTRL)

Technical Support Jun 5, 2008 - 1:24 PM

You can find the discussion about this here.

Johnny Booth Jun 5, 2008 - 1:20 PM

This works too, it was copied and pasted directly from the 2.82 DrawCli sample which works when compiled in VS2008. 


It would be really helpful if there was a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008.

Technical Support Jun 5, 2008 - 11:58 AM

You should specify the dialog control identifier value in MDI tabs creation method explicitly and it should not be equal to the IDC_STATIC value.

Gevork Odabashyan Jun 6, 2008 - 1:45 AM

Thanks, it’s work.



It would be really helpful to have a listing of recommended and/or required changes to existing ProfUIS applications when switching from VS2003/VS2005 to VS2008 as Johnny Booth suggested.



May be it would be helpfull to open new thread for this issue?