0

I am trying to migrate a project to VC++ 2010 The project contains the file TabbedMDI.h (by Danial Bowen) which gives the error "named followd by '::' must be a class or namespace name for the line "typedef typename TClient::TTabCtrl TTabCtrl;"

code snipit follows

template <
    class T,
    class TClient = CTabbedMDIClient< CDotNetTabCtrl<CTabViewTabItem> >,
    class TBase = WTL::CMDIWindow,
    class TWinTraits = ATL::CFrameWinTraits>
class ATL_NO_VTABLE CTabbedMDIFrameWindowImpl :
    public WTL::CMDIFrameWindowImpl<T, TBase, TWinTraits >
{
public:
    // Expose the type of MDI client
    typedef typename TClient TClient;
    // Expose the type of tab control
    typedef typename TClient::TTabCtrl TTabCtrl;

// Member variables
protected:
    TClient m_tabbedClient;
4

1 回答 1

1

刚刚使用 VC2010 Express(来自 WinDDK 的 WTL 8.1、ATL 8.00)从Custom Tab Controls、Tabbed Frame 和 Tabbed MDI编译了 Daniel 的SimpleTabbedMDIDemo示例,没有问题(清单重复除外)。你的问题在别处。

[编辑]
你使用最新的TabbedMDI.h吗?我的有:

// History (Date/Author/Description):
// ----------------------------------
//
// 2005/07/13: Daniel Bowen
// - Namespace qualify the use of more ATL and WTL classes.
// - CTabbedMDIFrameWindowImpl:
//   * Add GetMDITabCtrl
于 2011-03-02T23:44:08.640 回答