// @pymethod |PyCDocument|OnSaveDocument|Call the MFC OnSaveDocument handler. // This routine is provided so a document object which overrides this method // can call the original MFC version if required. static PyObject * ui_doc_on_save(PyObject *self, PyObject *args) { TCHAR *pathName; PyObject *obpathName; if (!PyArg_ParseTuple(args, "O", &obpathName)) // @pyparm string|pathName||The full path of the file to save. return NULL; CDocument *pDoc; if (!(pDoc=PyCDocument::GetDoc(self))) return NULL; if (!PyWinObject_AsTCHAR(obpathName, &pathName, FALSE)) return NULL; GUI_BGN_SAVE; BOOL ok = pDoc->OnSaveDocument(pathName); GUI_END_SAVE; PyWinObject_FreeTCHAR(pathName); if (!ok) // @pyseemfc CDocument|OnSaveDocument RETURN_ERR("OnSaveDocument failed"); RETURN_NONE; }