Click to See Complete Forum and Search --> : popup Toolbar problem!


April 9th, 1999, 09:25 PM
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

Bob H
April 11th, 1999, 08:37 AM
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.

April 11th, 1999, 09:15 PM
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
ironduke@freeuk.com
orhere
pjsharp@ironduke9.freeserve.co.uk


Paul Sharp