MFC 绘图程序的存储有关问题

MFC 绘图程序的存储问题
我现在有个SDI的绘图程序点击保存后会在本地存储一个文件,在工程中可以再次打开,调用的是Doc类中的Serialize(&ar)函数,
但是我现在不想让他保存成本地文件,希望可以在关闭的时候存储成字符串或许别的什么传给调用我这个程序的服务器,让服务器存储。再打开的时候在从服务器那般传送回来,该怎么实现啊?????不知道我这么叙述的清不清楚??
------解决方案--------------------
重载CDocument中的OnSaveDocument函数
参加下面的:

BOOL CVarDllDoc::OnSaveDocument(LPCTSTR lpszPathName) 
{
// TODO: Add your specialized code here and/or call the base class
SetModifiedFlag(FALSE);
NotifyChangeTitle();
AddSystemVariables();
if(g_pDataSvcDevInterface)
{
CNSProjectDirector *pDirector = g_pDataSvcDevInterface->GetProjectDirector();
if(pDirector)
{
CNSVarManager *pVarManager = pDirector->GetVarObjManager();
if(pVarManager)
{
return pVarManager->Save();
}
}
}
return FALSE;

//  return CDocument::OnSaveDocument(lpszPathName);
}


------解决方案--------------------
数据结构懂不?
------解决方案--------------------

BOOL CVarDllDoc::OnSaveDocument(LPCTSTR lpszPathName) 
{
// 完成你要保存的东西
   return Save(lpszPathName);
 // 注释掉这句只是让系统不调用CDocument的Serialize函数
//     return CDocument::OnSaveDocument(lpszPathName);
}
BOOL CVarDllDoc::Save(LPCTSTR lpszPathName) 
{
   // 保存你需要保存的东西
}