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 8449889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:49:35+00:00 2026-06-10T10:49:35+00:00

A notification is sent by a control to its parent. When I subclass a

  • 0

A notification is sent by a control to its parent. When I subclass a control using SetWindowSubclass, how can I handle the notifications? I don’t want to handle them in the parent’s window proc. Is there some thing I can do in subclass proc?

If I subclass a Edit control, how to handle EN_CHANGE notification in the subclass?

Update

This is the subclass proc:

LRESULT CALLBACK MyEditWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
{
  switch (uMsg)
  {
  default:
    return DefSubclassProc(hWnd, uMsg, wParam, lParam);
  }
}

I use

SetWindowSubclass(GetDlgItem(hWnd, ID_MYEDIT), MyEditWindowProc, 0, 0);

to subclass the Edit control.

But which message should I handle? Certainly not WM_NOTIFY because it’s handled by the parent.

  • 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-06-10T10:49:36+00:00Added an answer on June 10, 2026 at 10:49 am

    If I subclass a Edit control, how to handle EN_CHANGE notification in the subclass?

    Short answer: you can’t. If you subclass an edit, you only get to see the messages sent to it; you don’t get to listen to or intercept the messages already sent by it (although you can add additional outgoing messages).

    If you do need to do this, however, an alternative technique might be to create an intermediate window that wraps the edit, so that the original parent dialog has your wrapper as the child, and your wrapper has the edit as the child. Now your wrapper is positioned to intercept and filter messages going in either direction.

    It will have to take care to manually forward all relevant messages, and handle resizing and other housekeeping issues; you get a bunch of that ‘for free’ with subclassing, but have to deal with it explicitly when wrapping. Also, since mouse/keyboard input will still go to the inner control; if you need to listen in on that, then subclassing will be necessary in addition to wrapping.

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

Sidebar

Related Questions

I'm trying to display a notification using Easy Notification , but I don't want
Is it possible to retrieve the information from a sent Push Notification using the
For my application, I want to have a Notification sent to the user at
I want to send notification on Yammer through Ant, but no notification are sent.
Once a push notification is sent to a device via APNS, what are normal
I have written provider part in java. Notification is sent to the APNs. Not
Which notification message do you receive if any window is losing focus?
Is there a push notification plugin/approach for phonegap (android/iphone) where: the application can still
can I programmatically resize notification to size specify? My code js: var notification =
With my notification system, when the notification is sent, I would like to be

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.