EM_GETMODIFY
wParam = 0; /* not used, must be zero */
lParam = 0L; /* not used, must be zero */
An application sends an EM_GETMODIFY message to determine whether the contents of an edit control have been modified.
This message has no parameters.
The return value is nonzero if the edit-control contents have been modified, or it is zero if the contents have remained unchanged.
Windows maintains an internal flag indicating whether the contents of the edit control have been changed. This flag is cleared when the edit control is first created; or an EM_SETMODIFY message can be sent to clear the flag.
This example sends an EM_GETMODIFY message to determine whether the edit control has been modified and, if it has, retrieves the current contents of the edit control and clears the modification flag by sending an EM_SETMODIFY message:
char szBuf[128];
if (SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
EM_GETMODIFY, 0, 0L)) {
SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
WM_GETTEXT, sizeof(szBuf), (LPARAM) ((LPCSTR) szBuf));
SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
EM_SETMODIFY, FALSE, 0L);
}