Discussion:
how to know which message is sent when i pressed a icon?
(too old to reply)
Sridhar
2009-09-11 09:37:01 UTC
Permalink
HI Friends,
i want to know which icon is pressed in standard tool bar
(ex:cut icon is clicked etc.) and i want to record in a file as "cut" icon is
clicked..is it possible to record?

How to know the message is sent using SendMessage() or Postmessage()
when i clicked the "cut" button(is it possible to know by using spy++).

I am trying to record the above information("cut" button is clicked
etc..) by using hook WH_GETMESSAGE and trapping WM_COMMAND message. please
explain me the process how can we achive this? if possible please send some
code or explain by using which functions it is possible...

Thank you in advance..
--
--------------------------------------------
At last i learned something for today...:)
David Wilkinson
2009-09-11 10:19:40 UTC
Permalink
Post by Sridhar
HI Friends,
i want to know which icon is pressed in standard tool bar
(ex:cut icon is clicked etc.) and i want to record in a file as "cut" icon is
clicked..is it possible to record?
How to know the message is sent using SendMessage() or Postmessage()
when i clicked the "cut" button(is it possible to know by using spy++).
I am trying to record the above information("cut" button is clicked
etc..) by using hook WH_GETMESSAGE and trapping WM_COMMAND message. please
explain me the process how can we achive this? if possible please send some
code or explain by using which functions it is possible...
Take a look at Joe Newcomer's article on Windows hooks

http://www.flounder.com/hooks.htm
--
David Wilkinson
Visual C++ MVP
marc
2009-09-11 12:09:00 UTC
Permalink
Post by David Wilkinson
Take a look at Joe Newcomer's article on Windows hooks
Nothing interesting, apart copy-paste from MSDN....
See rather MSDN documentation about hooks and the C code samples for
all types of hook
Sree
2009-09-15 12:48:01 UTC
Permalink
Hi marc,
i learned little bit about hooking from msdn..i hooked menu
using wh_callwndproc and i am able to get menu information when user select
menu item(WM_MENUSELECT).but i want to know which menu item is
clicked(WM_COMMAND).
i am not able to know which menu item is clicked..any help should be greatly
appreciated..
--
--------------------------------------------
At last i learned something for today...:)
Post by marc
Post by David Wilkinson
Take a look at Joe Newcomer's article on Windows hooks
Nothing interesting, apart copy-paste from MSDN....
See rather MSDN documentation about hooks and the C code samples for
all types of hook
Continue reading on narkive:
Loading...