VC 中自定义对象保存到剪贴板中怎么处理!!!!!!!!!
Class A
{
cstring m_strName;
A* m_pNext;
}
Class B
{
std::list<A> m_list;
}
//allocate some global memory
HGLOBAL clipbuffer;
EmptyClipboard();
clipbuffer = GlobalAlloc(GMEM_MOVEABLE, sizeof(B));
B* buffer = (B*)GlobalLock(clipbuffer);
//put the data into that memory
memcpy(GlobalLock(buffer), (void*)pQDObj, sizeof(B));
//Put it on the clipboard
GlobalUnlock(clipbuffer);
SetClipboardData(format,clipbuffer);
CloseClipboard();
这样写B中的list没有办法保存到剪贴板中,请问高手这种情况怎么处理?
急急急!!!!