Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:28:33+00:00 2026-05-15T11:28:33+00:00

Is it possible to subclass another application’s control so that my application could do

  • 0

Is it possible to subclass another application’s control so that my application could do something before the other application executes it’s code and receiving the lParam and wParam? Ex: subclassing notepad’s Edit control and when the user types, being able to know what the user typed? would SetWindowSubclass work if I provide the hWnd of Notepad’s edit control? And would I receive the lParam and wParam of all its messages?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:28:35+00:00Added an answer on May 15, 2026 at 11:28 am

    Yes, that is easily possible, if your code is running in the application’s process. You can do that with a DLL. You would simply use GetWindowLongPtr with GWLP_WNDPROC to get the application’s window function, and use SetWindowLongPtr to set your own. In your window function you check for the message that you would like to alter, and call the application’s window function with the altered values. In case of any other message, you will have to call it straight. Use CallWindowProc to call the window funcion, because the default windows function is not a pointer.

    Another way would be to use the CallWndProc hook function. Call SetWindowsHookEx with WH_CALLWNDPROC to have it installed. Haven’t tried this one yet though, but you won’t need to have to be in the process’s space, IIRC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yet another compatibility problem from me. BACKGROUND I have an application that works in
I don't know if it's possible for me to include code here that's relevant
Is it possible to subclass dynamically? I know there's ____bases____ but I don't want
Is it possible to create subclass proxies in spring.net where the proxy is the
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Is it possible to subclass and inherit from javascript Arrays? I'd like to have
I have two classes, one of which is a subclass of another, and differs
Is it possible to to subclass NSMutableSet? I need to do this in order
Is it possible to have an entity class which inherits from another (abstract) entity
Is it possible to have a discriminator that works like this with NHibernate? If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.