如果在一个模式对话框中调用UpdateData,那你就没有正确使用MFC?
今天在一片老外的文章上看到如下一段话:
Note that you should almost never use UpdateData in a dialog. If you use it, you should use it only in a modeless dialog. There is, as far as I can tell, absolutely no excuse for using UpdateData in a modal dialog. A simple rule: If you're calling UpdateData in a modal dialog, you're not using MFC correctly.
(注意,你在对话框中应该尽量不要使用UpdateData函数。如果你要使用它,也最多在非模式对话框中使用,而绝对不要在模式对话框中使用。一个简单原则:如果在一个模式对话框中调用UpdateData,那你就没有正确使用MFC。)
那位仁兄能告诉我为什么。