Results 1 to 6 of 6

Thread: Subclassing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87

    Question

    How can i subclass an external application like calc?

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.

  4. #4
    Guest
    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..

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Guayaquil, Guayas, Ecuador
    Posts
    87
    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

  6. #6
    Lively Member
    Join Date
    Apr 2000
    Location
    Hell
    Posts
    89
    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.
    - Steve

    Real programmers use COPY CON PROGRAM.EXE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width