BGM wrote:Pulover, I am trying to adjust my script to use your class instead of the older forms framework toolbar.ahk.
The gosubs I am using detect whether the user held the shift key when they were called.
However, it seems that when I use this with the class_toolbar, the modifier keys get lost.
What do you recommend?
Well, you didn't give me an example to try so I don't know how you're doing this check. I've tested here with a sample script and I could detect the shift key pressed on the target label.
BGM wrote:Also, Pulover, in my own script, when I call hMYtoolbar.Customize(), the customize window appears for a second and then goes away. I can see the buttons just fine on my toolbar, and they work well enough (except for what I mentioned in my other post), but the customizer is wrong. I confirm that 0x0020 is present in the toolbars options. What can I do?
I forgot to add a note that this method requires OnNotifiy() implemented to work. The demo above shows a simple way to use it.
Pulover, sorry to be so noisy, but I've another problem. And this one is a bit strange.
So it looks like the tooltip mechanism doesn't like similar numbers. It confuses 201 with 101 even though they are two different labels in the script.
I think this is a bug somewhere.
In order to trigger an action the toolbar buttons are assigned to a CommandID, which is sent in a WM_COMMAND message. I didn't want to have to care about assigning those codes manually so I've created a function (StringToNumber()) that converts the label into a (possibly) unique code number. I don't recommend using labels that contain only numbers, not for toolbars nor for any project you're working on. Make them at least begin with a letter like L101. Or you can modify the function on the class to fit your needs.