15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How do I make Customize work for Toolbars?

John Toebes -- Toebes@spi.sas.com
Wednesday, August 07, 1996

Environment: VC++4.0/4.1 Win95/NT 4.0 Beta 2

I have been playing with off and on for a few months now and haven't
seemed to hit the right formula.  From looking at the archives, someone
asked this question last year, but nobody seemed to answer it.  Has
anyone successfully used the Customize() function with toolbars to allow
the user to do WYSIWYG drag/drop customization?  I have an application
with 6 toolbars which I would like the user to be able to modify (and
even create their own toolbars) in a manner similar to Excel or Word. 
In looking through MSDN, there are a few examples showing how to use the
Customize which brings up the dialog for a single toolbar.

The WIN32 SDK section on Common Controls certainly talks a lot about the
customization (and I have even gotten it to work a little), but after
perusing a lot of articles I can't find a single real example.

I am not sure that MSOffice is actually using the ToolbarCtrl, but if I
can ever get the customization to actually function, I believe that I
cam mimic the Customize dialog by defining even more toolbars but not
allowing the buttons to be deleted or inserted (just copied).

Has anyone gone down this path?  Are there any examples that I might
have missed?




Jeremy Smith -- jeremy_smith@mentec.ie
Monday, August 12, 1996

Yes, I have done the sort of customisation you are talking about.  You won't 
like the next part though.

I ended up rolling my own code.  A custom class derived form CToolBar, several 
instances of them (4 in my case), a property sheet dialog box to supply all 
possible buttons and the "usual" mouse event handling for drag & drop between 
multiple windows.  I ended up drawing the toolbar buttons on the dialog box 
myself from the bitmap information.

There was quite a lot of code - it was a solid 2 man weeks work but my boss and 
end customer were sure pleased with what they got.

I've looked in vain for a simpler way to go but still cannot find it.


Jeremy

[email jeremy.smith@mentec.ie]
[My opinions are my own and not my employers]



______________________________ Reply Separator _________________________________
Subject: How do I make Customize work for Toolbars?
Author:  mfc-l@netcom.com at internet-mail
Date:    10/08/96 12:42


Environment: VC++4.0/4.1 Win95/NT 4.0 Beta 2

I have been playing with off and on for a few months now and haven't 
seemed to hit the right formula.  From looking at the archives, someone 
asked this question last year, but nobody seemed to answer it.  Has 
anyone successfully used the Customize() function with toolbars to allow 
the user to do WYSIWYG drag/drop customization?  I have an application 
with 6 toolbars which I would like the user to be able to modify (and 
even create their own toolbars) in a manner similar to Excel or Word. 
In looking through MSDN, there are a few examples showing how to use the 
Customize which brings up the dialog for a single toolbar.

The WIN32 SDK section on Common Controls certainly talks a lot about the 
customization (and I have even gotten it to work a little), but after 
perusing a lot of articles I can't find a single real example.

I am not sure that MSOffice is actually using the ToolbarCtrl, but if I 
can ever get the customization to actually function, I believe that I 
cam mimic the Customize dialog by defining even more toolbars but not 
allowing the buttons to be deleted or inserted (just copied).

Has anyone gone down this path?  Are there any examples that I might 
have missed?






| Вернуться в корень Архива |