Geeks With Blogs
Willem's... {rue if I mellow} June 2007 Entries
Command UI Updating Windows Forms in C#
MFC provides a rather neat way of updating the state of window elements in an MFC CWnd (or derived) object during application idle-time. Typically, this is done by setting the element ID and member function in the ON_UPDATE_COMMAND_UI macro, and then declaring the function in the class header file: afx_msg void OnUpdateMyCommand(CCmdUI* pCmdUI); Then you implement the handler as follows: void CMyClass::OnUpdateMyCommand... pCmdUI) { if(IsMyCommandAvailable()) pCmdUI->Enable(TRUE); } This ......

Posted On Tuesday, June 5, 2007 12:53 PM

Copyright © Willem Fourie | Powered by: GeeksWithBlogs.net