Results 1 to 3 of 3

Thread: I need to get change events for textbox created by API

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2020
    Posts
    63

    Question I need to get change events for textbox created by API

    Hello, I share with you this project of user control, where I have problems capturing the change event in a textbox initialized by API in any hwnd window (using a picturebox), I need this to quickly get out of the compatibility problems of characters such as Japanese, Korean, arabic, etc... and it works quite well without using "richtextbox".

    Name:  example.jpg
Views: 271
Size:  38.3 KB

    Currently what I want is to obtain the change event simply following the same implementation by API, I am obtaining the return of the event through a timer that compares changes, but I feel that it is not the most optimal.

    I leave you the files, thanks for your help!!.

    Custom Textbox.zip

    Thank you so much!

  2. #2
    Hyperactive Member
    Join Date
    Jul 2021
    Posts
    267

    Re: I need to get change events for textbox created by API

    You need to subclass the parent window, and catch the WM_COMMAND message, then look for EM_CHANGE notification (HIWORD(wParam)).

  3. #3
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Red face Re: I need to get change events for textbox created by API

    You can take a look at my Unicode RichTextBox project. I also implemented it in a PictureBox and you can see how to subclass it and intercept the "EN_CHANGE" notification like Dry Bone said.

Tags for this Thread

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