Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Win32 edit control text change event

Posted on 2004-04-05
3
Medium Priority
?
3,888 Views
Last Modified: 2008-02-01
I'm new to Win32, how do I catch a text change event for an edit control in WndProc?
0
Comment
Question by:jd9288
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
nonubik earned 100 total points
ID: 10757475
It's EN_CHANGE notification message that comes with WM_COMMAND

like:

switch(uMsg)
{
  case WM_COMMAND:
   if((HIWORD(wParam) == EN_CHANGE) && //notification
     (LOWORD(wParam) == MY_IDC_EDIT))   //your edit control ID
   {
     ....
    }
    break;
}
0
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 100 total points
ID: 10757485
EN_CHANGE
The EN_CHANGE notification message is sent when the user has taken an action that may have altered text in an edit control. Unlike the EN_UPDATE notification message, this notification message is sent after the system updates the screen. The parent window of the edit control receives this notification message through a WM_COMMAND message.

LRESULT CALLBACK WindowProc(
  HWND hwnd,       // handle to window
  UINT uMsg,       // WM_COMMAND
  WPARAM wParam,   // edit control identifier, EN_CHANGE
  LPARAM lParam    // handle to edit control (HWND)
);
Parameters
wParam
The low-order word specifies the edit control identifier.
The high-order word specifies the notification message.

lParam
Handle to the edit control.
0
 
LVL 16

Expert Comment

by:nonubik
ID: 10757493
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question