From: David Webber on


"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:651a26p4km81u9a2j9nt974bi2djlbo5hv(a)4ax.com...

> Have you tried using an ASCII accelerator when the caret was in an edit
> control? I once
> heard that there were strange interactions with certain kinds of controls
> and
> accelerators. But I've never tried an ASCII accelerator and therefore
> have no experience
> in this area.

Not that I remember. But I'm rather inexperienced with accelerators.

My music software is essentially graphical as far as the music window is
concerned, and has shortcuts like

> ^ add accents,
. adds a staccato
_ adds a tenuto
' puts a dot after a note
" puts a double dot after a note
| adds a bar line
: makes it a repeat bar line
O moves a note an octave down
Shift+O moves it an octave up
F adds a forte
Shift+F fortissimo
Ctrl+F mezzoforte
P piano
Shift+P pianissimo
Ctrl+P mezzopiano
....

All these and more are easy to remember whatever your native language
(thanks in some cases to the ubiquity of Italian terms).

In my first version (released 1994) I discovered that accelerators are
horribly inadequate for this, and have gradually developed my own shortcut
class, which is consulted in OnChar() and in OnKeyDown() for the main frame
window and document window. And definitely NOT when an edit control (used
to enter text) has the focus!

Since then I have learned (and forgotten) a lot about keyboard handling
functions, but I reckon that (with a little revision) I could turn Shift+.
into > (on machines where this is true) to display it, and I was willing to
revisit accelerators. But I immediately found they were as fickle as I
remember them to be :-)

The virtual members of CMFCToolBarsCustomizeDialog *may* just allow me to
sneak my own shortcut handling, and it looks like it's worth a try. One
method would be to make my own classes starting with a copy of the
CMFCToolBarsCustomizeDialog source code, with changes at (quite a lot of)
appropriate places. But (unsurprisingly?) that is not my first preference
:-)

Dave

--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: Joseph M. Newcomer on
I have your software, and it would be nice if the mouse was above or below the staff it it
showed leger lines....[I added this to the music software I did and it was a big plus]
joe

On Sat, 26 Jun 2010 10:31:31 +0100, "David Webber" <dave(a)musical-dot-demon-dot-co.uk>
wrote:

>
>
>"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
>news:651a26p4km81u9a2j9nt974bi2djlbo5hv(a)4ax.com...
>
>> Have you tried using an ASCII accelerator when the caret was in an edit
>> control? I once
>> heard that there were strange interactions with certain kinds of controls
>> and
>> accelerators. But I've never tried an ASCII accelerator and therefore
>> have no experience
>> in this area.
>
>Not that I remember. But I'm rather inexperienced with accelerators.
>
>My music software is essentially graphical as far as the music window is
>concerned, and has shortcuts like
>
> > ^ add accents,
> . adds a staccato
> _ adds a tenuto
> ' puts a dot after a note
> " puts a double dot after a note
> | adds a bar line
> : makes it a repeat bar line
> O moves a note an octave down
> Shift+O moves it an octave up
> F adds a forte
> Shift+F fortissimo
> Ctrl+F mezzoforte
> P piano
> Shift+P pianissimo
> Ctrl+P mezzopiano
> ....
>
>All these and more are easy to remember whatever your native language
>(thanks in some cases to the ubiquity of Italian terms).
>
>In my first version (released 1994) I discovered that accelerators are
>horribly inadequate for this, and have gradually developed my own shortcut
>class, which is consulted in OnChar() and in OnKeyDown() for the main frame
>window and document window. And definitely NOT when an edit control (used
>to enter text) has the focus!
>
>Since then I have learned (and forgotten) a lot about keyboard handling
>functions, but I reckon that (with a little revision) I could turn Shift+.
>into > (on machines where this is true) to display it, and I was willing to
>revisit accelerators. But I immediately found they were as fickle as I
>remember them to be :-)
>
>The virtual members of CMFCToolBarsCustomizeDialog *may* just allow me to
>sneak my own shortcut handling, and it looks like it's worth a try. One
>method would be to make my own classes starting with a copy of the
>CMFCToolBarsCustomizeDialog source code, with changes at (quite a lot of)
>appropriate places. But (unsurprisingly?) that is not my first preference
>:-)
>
>Dave
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: David Webber on
"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:0unc26d602gg9sgpaikf3bge6cc2e982eh(a)4ax.com...

> I have your software,

Wow!

> and it would be nice if the mouse was above or below the staff it it
> showed leger lines....[I added this to the music software I did and it was
> a big plus]

Yes - feature request acknowledged.

Others have asked, and I tried it quite a while back, but there were too
many situations in which they weren't getting correctly erased when the
caret moved. However on modern machines full-screen redraws (the ultimate
sanction) are much faster than they used to be, so maybe it's time to try
again (once I get CMFCToolBar and friends mastered!)

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: David Webber on
"David Webber" <dave(a)musical-dot-demon-dot-co.uk> wrote in message
news:#TgabYIFLHA.3732(a)TK2MSFTNGP02.phx.gbl...

> "David Lowndes" <DavidL(a)example.invalid> wrote in message
> news:arj926d9fnr3n637tmf0rere0a8ra9ke5i(a)4ax.com...
>
>>>I've just tried adding an accelerator for key '0' in a default Win32
>>>application (no MFC) for the About box menu item and it works fine.

Just to note that my ASCII accelerator problem is resolved! And it wasn't
an ASCII accelerator problem at all.

Create a project;
Add some new accelerators to the .rc;
Compile and run.
Fine.

Create a project;
Compile and run.
Add some new accelerators to the .rc;
Compile and run.
New accelerators ignored.

The new MFC classes remember your accelerators in the registry.
When you run for the second time, after loading the accelerators from the
registry, it replaces them with the set in the registry (the ones you had
last time).

I don't often say this but...

doooooooooooooooooooooooooooooh!

:-(

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm



From: David Ching on
"David Webber" <dave(a)musical-dot-demon-dot-co.uk> wrote in message
news:eTNEZZGGLHA.5668(a)TK2MSFTNGP04.phx.gbl...
> The new MFC classes remember your accelerators in the registry.

What a crappy design. Do they at least have a property that lets you
disable that crappy behavior? I presume they added this to allow user to
edit accelerators. Do they have a UI for that? Why don't they persist just
the changed ones (which there aren't any since you haven't edited them
during the first run)?

-- David


First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: localhost
Next: How to subclass an MFC window?