Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can't Undock my CDialogBar

Can't Undock my CDialogBar

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NTense
    wrote on last edited by
    #1

    I can't seem to undock my CDialogBar. It creates the dialog bar, and docks it to the left side of my main frame, but I can't drag it away. I'm not quite sure what's wrong. Any ideas? Here's my code: //////// My DialogBar Class Declaration class CDlgTree : public CDialogBar { DECLARE_DYNAMIC(CDlgTree) public: CDlgTree(CWnd* pParent = NULL); // standard constructor virtual ~CDlgTree(); // Dialog Data enum { IDD = IDD_DLGTREEBAR }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() }; /////////////////////////////////////////////////////////////////////// // The creation in my CMainFrm class in OnCreate /////////////////////////////////////////////////////////////////////// // TreeDlg if (!m_treeBar.Create(this, IDD_DLGTREEBAR, CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT | CBRS_GRIPPER, AFX_IDW_CONTROLBAR_LAST - 1)) { TRACE0("Failed to create TreeBar\n"); return -1; } m_treeBar.SetWindowText("Components"); m_treeBar.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT); Thanks :-D

    J 1 Reply Last reply
    0
    • N NTense

      I can't seem to undock my CDialogBar. It creates the dialog bar, and docks it to the left side of my main frame, but I can't drag it away. I'm not quite sure what's wrong. Any ideas? Here's my code: //////// My DialogBar Class Declaration class CDlgTree : public CDialogBar { DECLARE_DYNAMIC(CDlgTree) public: CDlgTree(CWnd* pParent = NULL); // standard constructor virtual ~CDlgTree(); // Dialog Data enum { IDD = IDD_DLGTREEBAR }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() }; /////////////////////////////////////////////////////////////////////// // The creation in my CMainFrm class in OnCreate /////////////////////////////////////////////////////////////////////// // TreeDlg if (!m_treeBar.Create(this, IDD_DLGTREEBAR, CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT | CBRS_GRIPPER, AFX_IDW_CONTROLBAR_LAST - 1)) { TRACE0("Failed to create TreeBar\n"); return -1; } m_treeBar.SetWindowText("Components"); m_treeBar.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT); Thanks :-D

      J Offline
      J Offline
      Jose Lamas Rios
      wrote on last edited by
      #2

      NTense wrote: class CDlgTree : public CDialogBar Not sure if this is related to your problem or not, but it might be. Check this MSDN article[^] Note this: While it is normal to derive your own dialog classes from CDialog, you do not typically derive your own class for a dialog bar. Dialog bars are extensions to a main window and any dialog-bar control-notification messages, such as BN_CLICKED or EN_CHANGE, will be sent to the parent of the dialog bar — the main window. -- jlr http://jlamas.blogspot.com/[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups