Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ????????? Pin
Joaquín M López Muñoz1-Feb-02 6:04
Joaquín M López Muñoz1-Feb-02 6:04 
AnswerRe: ????????? Pin
wangyiming1-Feb-02 15:01
wangyiming1-Feb-02 15:01 
QuestionHow I can Know the cpu in MSDOS? Pin
Carlos Antollini1-Feb-02 4:28
Carlos Antollini1-Feb-02 4:28 
AnswerRe: How I can Know the cpu in MSDOS? Pin
Joaquín M López Muñoz1-Feb-02 5:54
Joaquín M López Muñoz1-Feb-02 5:54 
GeneralRe: How I can Know the cpu in MSDOS? Pin
Carlos Antollini1-Feb-02 6:01
Carlos Antollini1-Feb-02 6:01 
AnswerRe: How I can Know the cpu in MSDOS? Pin
Joaquín M López Muñoz1-Feb-02 6:01
Joaquín M López Muñoz1-Feb-02 6:01 
GeneralRe: How I can Know the cpu in MSDOS? Pin
Carlos Antollini1-Feb-02 6:06
Carlos Antollini1-Feb-02 6:06 
QuestionHow to get the y coordinate of a PolyBezier spline Pin
1-Feb-02 3:56
suss1-Feb-02 3:56 
GeneraladdObject() Pin
1-Feb-02 3:42
suss1-Feb-02 3:42 
GeneralRe: addObject() Pin
Jon Hulatt1-Feb-02 4:09
Jon Hulatt1-Feb-02 4:09 
GeneralProblem with menu/activex control event Pin
Roger Allen1-Feb-02 3:28
Roger Allen1-Feb-02 3:28 
GeneralRe: Problem with menu/activex control event Pin
Joaquín M López Muñoz1-Feb-02 3:37
Joaquín M López Muñoz1-Feb-02 3:37 
GeneralRe: Problem with menu/activex control event Pin
Roger Allen1-Feb-02 4:38
Roger Allen1-Feb-02 4:38 
GeneralRe: Problem with menu/activex control event Pin
Joaquín M López Muñoz1-Feb-02 5:33
Joaquín M López Muñoz1-Feb-02 5:33 
GeneralC++ objects in global memory... Pin
Chris Losinger1-Feb-02 2:26
professionalChris Losinger1-Feb-02 2:26 
GeneralRe: C++ objects in global memory... Pin
Joaquín M López Muñoz1-Feb-02 3:05
Joaquín M López Muñoz1-Feb-02 3:05 
GeneralWinsock2 Pin
31-Jan-02 23:43
suss31-Jan-02 23:43 
GeneralRe: Winsock2 Pin
Peter Weyzen1-Feb-02 12:41
Peter Weyzen1-Feb-02 12:41 
GeneralRe: Winsock2 Pin
2-Feb-02 23:02
suss2-Feb-02 23:02 
GeneralDownloading and booting WinCE on a LapTop Pin
Gert Boddaert31-Jan-02 23:14
Gert Boddaert31-Jan-02 23:14 
GeneralRe: Downloading and booting WinCE on a LapTop Pin
Gert Boddaert1-Feb-02 5:45
Gert Boddaert1-Feb-02 5:45 
GeneralpItem->CreateNewItem(clsid); and Ms Word Pin
Braulio Dez31-Jan-02 23:09
Braulio Dez31-Jan-02 23:09 
QuestionOLE automation how does it work??? Pin
Gérald Mercet31-Jan-02 22:18
Gérald Mercet31-Jan-02 22:18 
AnswerRe: OLE automation how does it work??? Pin
Braulio Dez31-Jan-02 23:19
Braulio Dez31-Jan-02 23:19 
GeneralCArchive and CompoundFile Pin
wangyiming31-Jan-02 22:04
wangyiming31-Jan-02 22:04 
the Document is a CompoundFile ( include: ole, image file, ... )
-----------------------------------------------------------
I can open or save Document( 1: CMyDoc::Serialize)
but how can I load file to CMfSet Directly ( 2: CMfSet::Open )

1. -----------------------------------------
void CMyDoc::Serialize(CArchive& ar)
{
// m_curMfSet is member var of CMyDoc : ( CMfSet m_curMfSet; )

m_curMfSet.Serialize(ar);
COleDocument::Serialize(ar);
...
};

2. -----------------------------------------
class CMfSet : public CObject
{
DECLARE_SERIAL(CMfSet)
public: // consturct or disconturct
CMfSet();
~CMfSet();

public:
BOOL Open(LPCTSTR lpszFilename);
// ...
};

BOOL CMfSet::Open(LPCTSTR lpszFilename)
{
CFile f;
if( !f.Open( lpszFilename, CFile::modeRead) )
return FALSE;

TRY
{
char buf[4096];
CArchive ar(&f, CArchive::load, 4096, buf);
Serialize(ar);
// It is sure error, but I don't know how correct it
}
CATCH_ALL(e)
{
return FALSE;
}
END_CATCH_ALL

return TRUE;
};


Thank you!


General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.