>But I am not able to understand why it was not working. I was trying
>to control Ctrl+V key combination which was not in my accelerated keys
>list.
Dave,
> Can you explain in more detail what you removed?
I was making SDI base application and by that time following
information I seen, which includes Ctrl+V as well.
IDR_MAINFRAME ACCELERATORS
BEGIN
"N", ID_FILE_NEW, VIRTKEY,CONTROL
"O", ID_FILE_OPEN, VIRTKEY,CONTROL
"S", ID_FILE_SAVE, VIRTKEY,CONTROL
"P", ID_FILE_PRINT, VIRTKEY,CONTROL
"Z", ID_EDIT_UNDO, VIRTKEY,CONTROL
"X", ID_EDIT_CUT, VIRTKEY,CONTROL
"C", ID_EDIT_COPY, VIRTKEY,CONTROL
"V", ID_EDIT_PASTE, VIRTKEY,CONTROL
VK_BACK, ID_EDIT_UNDO, VIRTKEY,ALT
VK_DELETE, ID_EDIT_CUT, VIRTKEY,SHIFT
VK_INSERT, ID_EDIT_COPY, VIRTKEY,CONTROL
VK_INSERT, ID_EDIT_PASTE, VIRTKEY,SHIFT
VK_F6, ID_NEXT_PANE, VIRTKEY
VK_F6, ID_PREV_PANE, VIRTKEY,SHIFT
END
After that I was removed ID_EDIT_PASTE resource ID from accelerator
table and try to capture Ctrl+V by code but it was not working.. One
by One I removed all entries from accelerator but WM_KEYDOWN message
start working on when no entry left in accelerator table..
> By "accelerated file", do you mean the accelerator table resource for
> your application - or something else?
I wrote "accelerator file" by mistaken that is accelerator table..
Regards,
-aims
David Lowndes - 10 Apr 2007 13:01 GMT
>> Can you explain in more detail what you removed?
>
[quoted text clipped - 8 lines]
>After that I was removed ID_EDIT_PASTE resource ID from accelerator
>table and try to capture Ctrl+V by code but it was not working.
OK, I just wanted to be clear that it was the resource accelerator
table you were referring to.
>One
>by One I removed all entries from accelerator but WM_KEYDOWN message
>start working on when no entry left in accelerator table.
I don't immediately know why that should be - are you saying that you
don't receive *any* WM_KEYDOWN messages, or just the ones that had
accelerators defined?
Why do you want to do the key detection in code rather than relying on
the existing accelerator & command messages they will create?
Dave
Mohammad Omer - 15 Apr 2007 08:06 GMT
> I don't immediately know why that should be - are you saying that you
> don't receive *any* WM_KEYDOWN messages, or just the ones that had
> accelerators defined?
>
> Why do you want to do the key detection in code rather than relying on
> the existing accelerator & command messages they will create?
some how accelerators was not working.. thats why, i was write
WM_KEYDOWN message..
Regards,
-aims
David Lowndes - 15 Apr 2007 09:44 GMT
>> I don't immediately know why that should be - are you saying that you
>> don't receive *any* WM_KEYDOWN messages, or just the ones that had
[quoted text clipped - 5 lines]
>some how accelerators was not working.. thats why, i was write
>WM_KEYDOWN message..
I think you should find out why they're (apparently) not working for
you - try using Spy++ to see where the command messages for the
accelerator keystrokes are going.
Dave
Mohammad Omer - 16 Apr 2007 00:44 GMT
> I think you should find out why they're (apparently) not working for
> you - try using Spy++ to see where the command messages for the
> accelerator keystrokes are going.
Hi Dave,
Please guide me, how to use Spy++ to see where the command messages
for the accelerator keystrokes are going?
Will I use "Find Window tool", select Messages Radio button Under
"Show Label" and using Finder Tool check all messages. Is this right
procedure?? Please guide me, In case of wrong.
Regards,
-aims
David Lowndes - 16 Apr 2007 07:52 GMT
>Please guide me, how to use Spy++ to see where the command messages
>for the accelerator keystrokes are going?
>Will I use "Find Window tool", select Messages Radio button Under
>"Show Label" and using Finder Tool check all messages. Is this right
>procedure?
Use Log Messages, and its Finder tool to select the top level window
of your application. You can also set the Child Windows check box. In
the messages pane, just select WM_COMMAND. Then try the accelerator
keys and check you do see the command messages being generated.
Assuming you do, then that's proof that the accelerator is working and
you should be able to handle those command messages in your
application.
Dave
Mohammad Omer - 16 Apr 2007 21:01 GMT
Hi,
Right, Thanks Dave.. :)
Regards,
-aims