//关键是这里
HRESULT CRichEditOleCallback::GetNewStorage(LPSTORAGE* ppStg)
{
if (!ppStg)
return E_INVALIDARG;
*ppStg = NULL;
//
// We need to create a new storage for an object to occupy. We're going
// to do this the easy way and just create a storage on an HGLOBAL and let
// OLE do the management. When it comes to saving things we'll just let
// the RichEdit control do the work. Keep in mind this is not efficient,
// but this program is just for demonstration.
//