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

    Question How to modify this region of the tool bar??

    Hi,
    Attached is a bitmap indicating my question. By modify I mean changing the back gorund color, adding controls etc. Thanks for your time.

  2. #2
    Join Date
    Feb 2005
    Posts
    218

    Re: How to modify this region of the tool bar??

    MFC uses several private classes—CDockBar, CMiniDockFrameWnd, and CDockContext, all declared in afxpriv.h—to implement docking. These classes implement the region you specified.

    So in order to modify it you have to derive from these classes if possible, or you have to create your ownerdraw toolbar and dockbar (like in guitoolkit for example).

    Sorry, but I don't think there is a way to do this in only 20 minutes. It will take a lot of work to do this, I think.

    greets,

    timv

  3. #3
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Lightbulb Re: How to modify this region of the tool bar??

    Quote Originally Posted by MrBeans
    Hi,
    Attached is a bitmap indicating my question. By modify I mean changing the back gorund color, adding controls etc. Thanks for your time.
    First tell how u r Creating your Toolbar
    you can by using TBBUTTON structure fill the structure and pass to your toolbar
    with the help of SendMessage
    like
    Code:
    int iCopy=0;
    TBBUTTON tbb[2]; 
    iCopy = SendMessage(hwndTB, TB_ADDSTRING, (WPARAM) 0,  (LPARAM) (LPSTR)"Save"); 
    //hwndTB is the handle of your ToolbarWindow
     tbb[0].iBitmap   =0 ;
      tbb[0].idCommand = 11; 
       tbb[0].fsState = TBSTATE_ENABLED; 
       tbb[0].fsStyle = TBSTYLE_BUTTON|TBSTYLE_AUTOSIZE  ; 
       tbb[0].dwData = 0; 
       tbb[0].iString = iCopy; 
    SendMessage(hwndTB, TB_ADDBUTTONS, (WPARAM)2,(LPARAM) (LPTBBUTTON) &tbb); 
     SendMessage(hwndTB, TB_AUTOSIZE, 0, 0);

  4. #4
    Join Date
    Jul 2005
    Posts
    767

    Re: How to modify this region of the tool bar??

    Any other ideas on this one?

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