CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2012
    Posts
    2

    Unhappy How to use dialog class for Docking Dialog

    Hi all Gurus. i am new to this forum and new to vc++ also i am just learning.

    i simply create Doc/View new project. Add Dialog Box With ID "IDD_COMMAND_WINDOW" on Res. and Add 2 Edit Box with one button.

    I Create Class for IDD_COMMAND_WINDOW from Class Wizard " ClsCommandWindow ", in this class i have declare variable from Class Wizard for 2 Edit box

    CString m_Edit1; and CMyCommandText m_Edit2; CMyCommandText is Separate Class for the control EditBox2. on CMyCommandText i add Window Message Handler OnCahr, OnGetDlgCode, OnKeyDown, OnChange and so on. so i can control easily.

    Now in CMainFrame i Add

    CDialogBar m_wndDlgBar // to make dockable dialogbox

    in OnCreate(...) here it use the dialog ID IDD_COMMAND_WINDOW. but no class.

    Code:
     if (!m_wndDlgBar.Create(this, IDD_COMMAND_WINDOW,
           WS_CHILD | WS_VISIBLE | CBRS_BOTTOM|CBRS_TOOLTIPS|CBRS_GRIPPER |CBRS_FLYBY| CBRS_SIZE_DYNAMIC, IDD_COMMAND_WINDOW))
       {
          TRACE0("Failed to create DlgBar\n");
          return -1;      // Fail to create.
       }
        m_wndDlgBar.EnableDocking (CBRS_ALIGN_BOTTOM   );
        EnableDocking(CBRS_ALIGN_BOTTOM   );
        DockControlBar(&m_wndDlgBar);
    It Display Dialog box with dockable but there is no use of ClsCommandWindow class. so where do i use the ClsCommandWindow class? if it use then i can control all event on that dialog box.

    or Is there any other way to use it. if so, please guide me on this.

    i hope this much make clear, what i want to make.

    Thanks for help.

    Amrit

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: How to use dialog class for Docking Dialog

    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  3. #3
    Join Date
    Jul 2012
    Posts
    2

    Re: How to use dialog class for Docking Dialog

    hi Thanks for reply. it look good info for me.
    i will try.
    Thanks again.
    Amrit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured