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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -