CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    popup Toolbar problem!

    Have any of you seen Netobjects fusion or corel Draw, they have funny toolbar buttons, where if you hold the mouse down on the button a caption less floating
    toolbar appears beneath it, allowing you to move the mouse over a particular button to select it. As soon as the mouse button is let up if it is over a button inthe floating toolbar it selects it inplace of the old one.

    I am trying to recreate this code for all to use.

    the problem I have is that tool bar buttons only have a command handler,
    I need a command and a leftbutton down handler. I have tried using a timer to some success, the main problem is setting the mouse capture, as soon as the left button is let up anywhere on the screen the floating toolbar should hide.

    also capture problems stop the original button from checking after it is clicked.

    can anyone help


  2. #2
    Join Date
    Apr 1999
    Posts
    123

    Re: popup Toolbar problem!

    I am working on something similar. I am trying to create toolbars to represent "sub-toolbars" to a main toolbar as used in PhotoImpact and Photoshop. A selected button in the main vertical toolbar causes a caption-less horizontal toolbar with subchoices to appear adjacent to the selected button. How do I create a caption-less toolbar that can be positioned at an arbitrary point on the screen??? In creating a floating toolbar, I can't seem to avoid the caption. I can create something very similar to what I want by creating a modeless dialog box without a caption holding the subchoices.


  3. #3
    Guest

    Re: popup Toolbar problem!

    Hi bob,
    sorry I have taken so long to respond!

    I have solved the captionless toolbar problem, derive the flosting tool bar
    from CToolBar, then put this code in the on move message handler.

    void CMyToolBar::OnMove(int x, int y)
    {
    CToolBar::OnMove(x, y);

    CWnd *pParent = GetParent();
    if(pParent) pParent = pParent->GetParent();
    if(pParent != NULL && pParent->GetRuntimeClass() == RUNTIME_CLASS(CMiniDockFrameWnd)
    && pParent->GetStyle() & WS_SYSMENU)
    {
    pParent->ModifyStyle(WS_CAPTION, 0, 0);
    }

    }


    if you wish to work together on this email me

    here
    [email protected]
    orhere
    [email protected]


    Paul Sharp


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