Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPTabClientWnd - EnableTearOff issues
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabClientWnd - EnableTearOff issues

 Post Reply Post Reply
Author
Message
jw_statica View Drop Down
Groupie
Groupie


Joined: 23 May 2018
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jw_statica Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabClientWnd - EnableTearOff issues
    Posted: 10 February 2025 at 5:24am
If you enable tear off in CXTPTabClientWnd object, you can take off tabs from the window and it works, it will spawn a new window once taken outside the window. Then that new window can be placed back onto it's original window, bringing back the taken off tabs. However, if you take off a tab from that new window, if the tab is the only tab appearing on that window, it will initially once again create a new window - but otherwise program will completely break during processing input messages, with assertions implying that the program is still trying to access a window that doesn't exist.

The issue can be easily reproduced by simply adding a m_wndClient.EnableTearOff(); line in RibbonMDISample.

We have created a video that more clearly shows the issue: https://statica.pl/pliki/n5/RibbonMDI_Tearoff.mp4
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 302
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 5 hours 52 minutes ago at 10:27am
Hello,

To resolve your provblem you need to change
1. Base class to CXTPMDIFrameWndEx. class CMainFrame : public CXTPMDIFrameWndEx
2. Add virtual functions as below
    virtual CXTPDockingPaneManager* GetDockingPaneManager();
    virtual CXTPTabClientWnd* GetTabClientWnd();

CXTPDockingPaneManager* CMainFrame::GetDockingPaneManager()
{
    return NULL;
}

CXTPTabClientWnd* CMainFrame::GetTabClientWnd()
{
    return &m_wndClient;
}

3. See please MDITabWindow and GUI_VisualStudio samples

Regards,
Artem Gontarenko
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.