Click here to Skip to main content
15,905,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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!


GeneralRe: CArchive and CompoundFile Pin
wangyiming1-Feb-02 15:11
wangyiming1-Feb-02 15:11 
Generaltrouble Pin
31-Jan-02 21:31
suss31-Jan-02 21:31 
GeneralRe: trouble Pin
Johan Rosengren22-Jun-04 8:42
Johan Rosengren22-Jun-04 8:42 
Questiondoes Windows registry record the bootup and shutdown time? Pin
DengJW31-Jan-02 21:01
DengJW31-Jan-02 21:01 
GeneralSTL - Newbie... Pin
Bernhard31-Jan-02 20:34
Bernhard31-Jan-02 20:34 
GeneralRe: STL - Newbie... Pin
Joaquín M López Muñoz31-Jan-02 23:41
Joaquín M López Muñoz31-Jan-02 23:41 
GeneralRe: STL - Newbie... Pin
Bernhard31-Jan-02 23:51
Bernhard31-Jan-02 23:51 
GeneralSorry i was in a hurry... Pin
Bernhard31-Jan-02 23:53
Bernhard31-Jan-02 23:53 
GeneralRe: STL - Newbie... Pin
Joaquín M López Muñoz1-Feb-02 3:15
Joaquín M López Muñoz1-Feb-02 3:15 
Generalimport a .DXF file Pin
Gayan31-Jan-02 20:31
Gayan31-Jan-02 20:31 
GeneralRe: import a .DXF file Pin
Jon Hulatt31-Jan-02 23:00
Jon Hulatt31-Jan-02 23:00 
GeneralRe: import a .DXF file Pin
Roger Allen1-Feb-02 3:30
Roger Allen1-Feb-02 3:30 
GeneralOO Design question Pin
Jerome Conus31-Jan-02 19:48
Jerome Conus31-Jan-02 19:48 
GeneralRe: OO Design question Pin
Paul M Watt31-Jan-02 20:11
mentorPaul M Watt31-Jan-02 20:11 
GeneralRe: OO Design question Pin
Bernhard31-Jan-02 20:14
Bernhard31-Jan-02 20:14 
GeneralRe: OO Design question Pin
Joaquín M López Muñoz31-Jan-02 20:20
Joaquín M López Muñoz31-Jan-02 20:20 
GeneralAbout "https://" Pin
wabc31-Jan-02 19:28
wabc31-Jan-02 19:28 

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.