views:

58

answers:

1

Hi Friends,

i am using windows xp (sp2) operating system.

when i used spy++ for notepad and wordpad and when i select menu items it is showing WM_MENUSELECT msg and if i clicked menu item it showing WM_COMMAND.

but when i used spy++ for sql server 2005 and vs2005 and when i select menu items it is not showing any messages( i mean WM_MENUSELECT is not showing) what is the problem...is there any new message generate for these appln when i select menu item?...

i really confused with this...i want to get menu text...i did for notepad and wordpad(using WM_MENUSELECT). then how can i achive the same for these(VS2005,SQL2005).is not possible for this? if possible tell me which msg i have to trap?

Thanks in advance

A: 

These applications (VS2005, SQL2005) are built on top of the .Net framework and Windows.Forms. The menu bar and its items are not of the standard window classes used for native windows applications, but rather of some custom type.

.Net applications use the event system provided by the framework to do internal notification. They do not work with windows messages as native windows applications do.

Maybe you can tell more about what you want to achieve, so we might be able to provide other solutions.

Frank Bollack
Thanks for your reply,My intesion is to know menu item text when user clicks on menu item or standard tool bar icons. i am getting same problem when i tried with MS-Excel2003.( i mean it is not generating WM_MENUSELECT msg) i want to write in a file which menu item is clicked? what i have to do for this? please tell me..now i stuck with this problem...Thanks in advance...
pasham
I don't know of a way to do this on my own, but there a suitable applications out there. Take a look at this SO question and the suggested programs: http://stackoverflow.com/questions/72016/windows-forms-test-automation
Frank Bollack
i am working on vc++6.0 and windows xp..
pasham
I saw that. What I wanted to say was, I do not know of a way to to this programmatically, so I suggested to use an application that can log the events you want to log with your app.
Frank Bollack
these tools are not help to me frank..is there any other way to achive this?
pasham