PDA

Click to See Complete Forum and Search --> : Subclassing


Antonio Begue
May 17th, 2000, 05:17 AM
How can i subclass an external application like calc?

Sam Finch
May 17th, 2000, 05:27 AM
Learn C++, you just can't do it in Pure VB, I had a damned good go at doing it in VB but you just Can't.

parksie
May 23rd, 2000, 12:28 AM
Actually, Sam, you can...but by the time it works, you've used so much of the API that it looks like C++.

Antonio: why d'you need to subclass calc? There are considerably better freeware calculators with source code available...unfortunately they're likely to be in C++, so I agree with Sam.

PS: I use C++ most of the time, and then VB for building nice UIs.

May 23rd, 2000, 02:12 AM
I am not too sure what this is, but I know its not possible with pure VB(meaning no API whatsoever), you have to use API.

by the way , what is subclassing?
please explain..

Antonio Begue
May 23rd, 2000, 04:01 AM
I don't need to subclass the calc, it was just an example.
What i realy need to do is to click a dynamic menu of an external application and i thought that if i subclass it and see what msg send that menu i will be able to send that msg to tha app and click it.

Thanks anyway

Stevie-O
May 30th, 2000, 08:19 PM
To find out what message a menu item sends is easy, and you don't need any subclassing. Use Spy++ to spy on the window's messages and see what parameters are sent with the menu's WM_COMMAND message.

By 'dynamic menu', I have a feeling you mean popup menu. Popup menus aren't necessarily dynamic - in fact, most are *NOT* - they just get activated differently. However, be warned: if the app uses the TPM_RETURNCMD flag when it calls TrackPopupMenu to show the menu, you'll never be able to fool it.