Здравствуйте, Erik_, Вы писали:
E_>Привожу кусок карты сообщений диалога, в котором реализована сия идея. Не работает
. Я потому и спрашивать стал.
E_>E_>...
E_>BEGIN_MSG_MAP_EX(CNewDialog)
E_>...
E_>NOTIFY_HANDLER_EX(IDC_NAMEEDIT, EN_CHANGE, OnNameChange)
E_>...
E_>END_MSG_MAP()
E_>...
E_>LRESULT OnNameChange(LPNMHDR lpNMHDR)
E_>{
E_> CEdit wnd = GetDlgItem(IDC_NAMEEDIT);
E_> int iStrLen = wnd.GetWindowTextLength();
E_> ...
E_> UIEnable(IDOK, iStrLen != 0, true);
E_> return 0;
E_>}
E_>
E_>Компиляется ОК. Но OnNameChange ни разу не вызвался.
BEGIN_MSG_MAP(CMainDlg)
COMMAND_HANDLER(IDC_NAMEEDIT, EN_CHANGE, OnEnChangeNameedit)
END_MSG_MAP()
LRESULT OnEnChangeNameedit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT CMainDlg::OnEnChangeNameedit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CAxDialogImpl<CMainDlg>::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
ATLTRACE("OnEnChangeNameedit()\n");
return 0;
}
не понятно откуда проблема

рабочий код создается парой кликов мышкой в Visual Studio
... << RSDN@Home 1.1.4 beta 7 rev. 458>>