15,979
社区成员
发帖
与我相关
我的任务
分享
static DWORD CALLBACK
MyStreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CFile* pFile = (CFile*) dwCookie;
pFile->Write(pbBuff, cb);
*pcb = cb;
return 0;
}
CFile cFile(TEXT("myfile.rtf"),CFile::modeCreate|CFile::modeWrite);
EDITSTREAM es;
es.dwCookie = (DWORD_PTR) &cFile;
es.pfnCallback = MyStreamOutCallback;
m_richedit.StreamOut(SF_RTF, es);