我需要帮助覆盖CDocument :: OnSave,OnSaveas和DoSave [英] I need help with overriding CDocument::OnSave, OnSaveas and DoSave
本文介绍了我需要帮助覆盖CDocument :: OnSave,OnSaveas和DoSave的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
本文作者
CDocument :: DoSave透露
声称拥有覆盖dosave,但在检查文件时
http://msdn.microsoft.com/en-us/library/sd83ta1b.aspx
我找不到OnFileSave,OnFileSaveas和DoSave作为成员函数.Pls我不知道该怎么做。请帮助我。
The author in of this article
CDocument::DoSave revealed
claimed to have overriden dosave, but on checking documentation at
http://msdn.microsoft.com/en-us/library/sd83ta1b.aspx
I could find none of OnFileSave, OnFileSaveas and DoSave as a member function.Pls I don't know what to make of this.Kindly help me out.
推荐答案
正如你所说的一篇文章,请在底部添加评论。
作者将收到通知并回复。
As you are referring one Article, then please add a comment at the bottom.
The author will get notified and reply you back.
如果查看afxwin.h文件,CDocument
类实现确实有这些调用。不确定为什么MS没有记录它们但是它们就在那里。
DoSave标记为:
If you look at the afxwin.h file, theCDocument
class implementation does have those calls. Not sure why MS doesn't document them but they're there.
DoSave is under a section labeled as:
// implementation helpers
和其他两个在:
and the other two are under:
// file menu commands
没有OnSave
,但有OnSaveDocument
:
http://msdn.microsoft.com/en-us/library/sd83ta1b.aspx [ ^ ]。
为什么你可能需要帮助才能覆盖?如果一个函数是虚函数(并且上面提到的函数是虚函数),我希望你知道如何覆盖它。如果不是,你根本无法覆盖它?这些东西可能需要帮助吗?
另一方面,文章的作者负责,无论是否能与这个人联系。我有一个问题要问:您是否要开始自己编写代码而不是阅读其他人提供的代码并使用它?或者你已经做到了?然后专注于它。和其他人一起玩代码并不是最有效的做事方式或学习方式。
-SA
There is noOnSave
, but there isOnSaveDocument
:
http://msdn.microsoft.com/en-us/library/sd83ta1b.aspx[^].
And why would you possibly need help on overriding? If a function is virtual (and the function mentioned above is virtual), I hope you know how to override it. If it is not, you cannot override it at all? How such stuff may possibly need any help with?
On the other detail, the author of the article is responsible, no matter if can reach this person or not. I have a question for you: are you going to start writing code by yourself instead of reading code offered by others and playing with it? Or you already do? Then focus on it. Playing with other people's code is not the most productive way of doing things or learning.
—SA
这篇关于我需要帮助覆盖CDocument :: OnSave,OnSaveas和DoSave的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文