How to Disable OK button when there is a text change in Editbox in MFC -


how disable ok button when there text change in editbox control?

when following code used,it results in exception

begin_message_map(lockinginfo, cdialog)      //{{afx_msg_map(lockinginfo)    on_en_change(idc_info,onenchangeedit1)     //}}afx_msg_map  end_message_map()  void lockinginfo::onenchangeedit1() {   getdlgitem(idok)->enablewindow(false); } 

and exception is:

"access violation reading location..." in line assert(::iswindow(m_hwnd) || (m_pctrlsite != null)); of function cwnd::enablewindow(bool benable) in winnocc.cpp

thanks in advance


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -