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

  • SEARCH
  • Home
  • 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 93367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:20:00+00:00 2026-05-10T23:20:00+00:00

In win32, how do I setup a callback mechanism for RichEdit I have not

  • 0

In win32, how do I setup a callback mechanism for RichEdit I have not created myself?

PART 1

I’m reading from a textedit field in another application’s GUI. This works just fine now, except after the first read I’d like to fetch only new or modified lines. In GTK+ or Qt I’d just install a callback on some signal the field edits when its changed, but how does it work on Win32?

My MSDN searches result with nothing useful, probably because I don’t know the exact term to search for. The class of the textedit is RichText20W, and it has some messages that are probably used somehow, though that article just discusses using them for the parent of the class.

PART 2

Also, if there is no such ‘text changed, here is the newly inserted text’ callback which returns the new content immediately, I need some way to easily detect what is new. From top-of-my-head:

  1. Have a marker at the end of the text block we’ve read, and only read between that and the end.
  2. Store what we’ve read previously, and after a second read, remove the duplicate part from the latter to have the newly inserted stuff.

Option 2 might not be viable, since the textedit can contain any amount of text. The marker part sounds doable, but yet again, my feeble Win32 skills and horrible Win32 function names prevent me from finding the right way to do it.

Note that all these must be doable for a textedit I do not own and have not created, they belong to a third party process.

Code samples in C++ highly appreciated.

Disclaimer

Obviously, if there is some better way of doing it, let me know. I only assumed callback would be the way to go based on my previous experience with GTK+/Qt. Feel free to show me the path 🙂

  • 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. 2026-05-10T23:20:00+00:00Added an answer on May 10, 2026 at 11:20 pm

    Win32 controls don’t work on message-specific callbacks that you can subscribe to. They just send messages to their parent window when something happens, in this case EN_UPDATE, EN_CHANGE and all that. Even these events don’t tell you what text changed. They only tell you that it did change.

    You could subclass the parent, but the documentation for SetWindowLongPtr explicitly says you ‘should not subclass a window class created by another process.’ Something like this is probably possible with hooks, but I haven’t used them enough to say for certain how you’d actually do it.

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

Sidebar

Ask A Question

Stats

  • Questions 104k
  • Answers 105k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Follow an implementation of naive implementation of a visitable tree:… May 11, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer One alternative which I have used in SQL which could… May 11, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer Your best bet is probably using EmacsW32 which is nicely… May 11, 2026 at 8:39 pm

Related Questions

I have a scenario setup where I need to test to see if the
I have a question about how to deploy WPF application into a PC without
I have a certain application in MSVC6.0 all C code. I have it as
The Win32 GetTimeZoneInformation function returns your systems local time zone as set up in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.