|
2 problems are obvious:
mwAarray is not declared. looks misspelled to me
also, the function you are using needs a variable of type mxArray** instead of mwArray** which you are sending.
It also returns mxArray* instead of mwArray* which you are trying to stuff the return into.
|
|
|
|
|
Hi guys,
I hope this is not difficult to do. How do I make the widths of columns in a list control (Report view) fixed? Which the users cannot change them (no change width type of cursor).
Thanks in advance
and Merry Christmas everyone
|
|
|
|
|
Check out CodeProject code section.
http://codeproject.com/listctrl/headerctrl.asp
Kuphryn
|
|
|
|
|
How do I get page breaks to print correctly in CEditView? I checked to Wordpad example but can't find the code that does the work.
Thanks
Kevin
|
|
|
|
|
While Printing by MFC you have to do the Pagination by urself
i.e. Override OnPrepareDC or OnBeginPrinting and set the no of pages stuff
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I got that far. I was trying to see how it was done in the Wordpad example. At this point I believe it has to do with using the RichEditCtrl as opposed to CEditView.
|
|
|
|
|
Hi everyone! I have a question regarding HPTestExec and C++. My task is to create an action to be executed in HPTestExec, this action will call the C++ code. I would need to write C++ code to call up Windows Media Player. To do it programmatically, I would need to download and install the Microsoft DirectX SDK and write code using this API. Does anyone have suggestions on how I would go about doing that? Or would there be a simpler way of achieving it? Thanks for your time.
|
|
|
|
|
You could instantiate the Windows Media Player ActiveX Control if ur design allows it , it should be simple enough or you just have to use C++ code in that case u r stuck with SDK
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Hi!
In my application I have to convert several normal one-byte ascii strings to unicode strings.
I do this like follows:
lptTitle = A2W(ptrTitle);
lptURL = A2W(ptrURL);
lptUserName = A2W(ptrUserName);
lptPassword = A2W(ptrPassword);
lptAdditional = A2W(ptrAdditional); All variables prefixed with lpt are of type LPTSTR and all prefixed with ptr are of type CHAR*.
A2W is defined as:
#define A2W(lpa) ( ((LPCSTR)lpa == NULL) ? NULL : ( _convert = (lstrlenA(lpa)+1), ATLA2WHELPER((LPWSTR) alloca(_convert*2), lpa, _convert)))
Now my question: the A2W macro allocates memory, but when does it free it??? Doesn't this macro result in memory leaks??
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
MSDN
_alloca allocates size bytes from the program stack. The allocated space is automatically freed when the calling function exits (not when the allocation merely passes out of scope). Therefore, do not pass the pointer value returned by _alloca as an argument to free.
Thank You
Bo Hunter
This is what Heath Stewart thinks about Certifications.
Heath Stewart said
"Personally, I am not certified because I really don't want to be. I know a large number of people with certifications that know crap. They studied for the tests, memorized a few things, took the tests (sometimes a couple times) and got their certs. They're still idiots."
|
|
|
|
|
Wonderful, thank you!
Can I use the A2W and W2A macros more than one time in my function? Like in my example?
[EDIT]Ok, no more a problem. I've solved it another way.[/EDIT]
Thanks for your reply!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Using A2W and the other conversion routines are perfectly fine for a handfull of strings in a routine. Once the routine returns, the memory is freed by the magic of the stack.
Where you can have problems is if the strings are very long (i.e. 32k each) or if you do a lot of them such as in a loop.
for (i = 0; i < 189519029; i++) psz = A2W (psz2);
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I have CD that contains Platform SDK, I installed the core SDK from that CD, but there is no reference to WTL, ATL in the CD.... Does any one know where in the CD or under which opetion i will find the above things.
regards./
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
|
Thanx again Micheal, i have visual studio installed and i have ATL and also downloaded WTL from MS and installed it.
But i heard that there are different versions of ATL (not sure of WTL) how do i get the latest ATL? Any idea about the latest version no of ATL?
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
As far as I know, you can't. You use the version of ATL you get with the compiler.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I am creating an MFC application using libraries without the source. The libraries write out information to stderr and stdout and I'd like to grab the information and display it in my MFC application.
Can anybody help?
Thanks
|
|
|
|
|
I have downloaded the Quake engine source code. To my surprise, I
could not find the main() method. So I wonder Why commercial
software does not have main()? Is it in the Windows?
In the case of Java Applet, the main() method is in the browser, so
I guess the reason why the Quake engine source code does not have
main() is because the main() is in the Windows. Did I guess wrong?
Does all the commercial software not having main()? or just some
of the specific software?
|
|
|
|
|
|
There are lots of files with lots of different names. I guess the main
file is called q_main.c
But still can not find any WinMain() or other main() method in the file.
Any ideas?
|
|
|
|
|
I am a newer in this ;Pboard, so I want to enjoy the big family!
|
|
|
|
|
Welcome to the big family, merry Christmas.
|
|
|
|
|
I don't know how to use it. I need to prevent static DB objects used simultaneously..
|
|
|
|
|
We are using the cad library for developing the Auto cad application.We are in need to read the Dxf file using your library.Just explain how to read the dxf file.
Never let anything go for granted. <>
|
|
|
|
|
this is my beta code use it if it's useable for u (up to DXF14)
////////////////////////////////////////////////////////////////
_READ.h: interface for the CDXF_READ class.<br />
<br />
#if !defined(AFX_DXF_READ_H__0C34F7F9_A3E2_11D2_B76C_CAED36AA095C__INCLUDED_)<br />
#define AFX_DXF_READ_H__0C34F7F9_A3E2_11D2_B76C_CAED36AA095C__INCLUDED_<br />
<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
<br />
#define ER_NOTABLEHEADER -993<br />
#define ER_VOIDBLOCKS -994<br />
#define ER_VOIDHEADER -995<br />
#define ER_VOIDTABLES -996<br />
#define ER_FILECORRUPT -997<br />
#define ER_NOENDSEC -998<br />
#define ER_MISSEDENDOFFILE -999<br />
#define ER_WARNNIG -1000<br />
#define ER_INVALIDFILENAME -1001<br />
#define ER_NOSUCHFILE -1002<br />
#define ER_BADVALUE -1003<br />
#define ER_VOIDENTITY -1004<br />
#define ER_BADTABLES -1005<br />
<br />
<br />
#include "..\drw_dxf.h"<br />
<br />
class CDXF_FILE <br />
{<br />
CStdioFile m_file;<br />
CString m_str; <br />
public :<br />
int Open(LPCSTR);<br />
void Close();<br />
CDXF_FILE ();<br />
virtual ~CDXF_FILE ();<br />
<br />
double ReadDouble();<br />
float ReadFloat();<br />
__int8 ReadInt8();<br />
__int16 ReadInt16();<br />
__int32 ReadInt32();<br />
<br />
BOOL EndOfFile();<br />
BOOL ReadString(CString&);<br />
<br />
private:<br />
BOOL m_fileColse;<br />
};<br />
<br />
class CDXF_READ <br />
{<br />
<br />
public:<br />
BOOL ProcessSystemMsg();<br />
struct DXF_RECORD<br />
{<br />
int what;<br />
__int8 m_int8;<br />
__int16 m_int16;<br />
__int32 m_int32;<br />
double m_double;<br />
float m_float;<br />
CString m_string;<br />
} Rec;<br />
<br />
int Read_DXF_Line();<br />
CDXF_READ();<br />
CDXF_READ(LPCSTR dxf_file);<br />
virtual ~CDXF_READ();<br />
<br />
int Process_Free_DXF(LPCSTR dxf_file=NULL);<br />
int Process_DXF(LPCSTR dxf_file=NULL);<br />
private:<br />
BOOL GroupCircle;<br />
BOOL EndOfFileReached;<br />
BOOL NOT_READ_BEFOR;<br />
CDXF_FILE fileDXF;<br />
int Process_EndOfFile();<br />
int Process_Entites(BOOL READ_SECTION = TRUE);<br />
int Process_Tables(BOOL READ_SECTION = TRUE);<br />
int Process_Blocks(BOOL READ_SECTION = TRUE);<br />
int Process_Header(BOOL READ_SECTION = TRUE);<br />
int Open_DXF_File();<br />
int Parse_LayerInfo();<br />
int Parse_TableItemInfo();<br />
int Parse_LineInfo();<br />
int Parse_PolyLineInfo();<br />
int Parse_LWPolyLineInfo();<br />
int Parse_CircleInfo();<br />
int Parse_ArcInfo();<br />
int Parse_TextInfo();<br />
int Parse_MTextInfo();<br />
int Parse_SolidInfo();<br />
int Parse_PointInfo();<br />
int Parse_InsertInfo();<br />
int Parse_SeqendInfo();<br />
int Parse_VertexInfo();<br />
int Parse_EllipseInfo();<br />
int Parse_UnknownInfo();<br />
<br />
CString sDXF_FILE;<br />
__int16 GetLayer(LPCSTR ln);<br />
<br />
protected:<br />
long Line_No_Dxf_Read;<br />
int LayerCount;<br />
DXF_LAYER *LayerArray[512] , Layer;<br />
CString CurrentGroupName;<br />
struct DXF_POINT Point;<br />
struct DXF_LINE Line;<br />
struct DXF_CIRCLE ArcCircle;<br />
struct DXF_SOLID Solid;<br />
struct DXF_TEXT Text;<br />
struct DXF_MTEXT MText;<br />
struct DXF_LWPOLYLINE LWPolyLine;<br />
struct DXF_POLYLINE PolyLine;<br />
struct DXF_VERTEX Vertex;<br />
struct DXF_INSERT Insert;<br />
struct DXF_TABLES Tables;<br />
struct DXF_ELLIPSE Ellipse;<br />
virtual void Handle_LayerInfo() = 0 ;<br />
virtual void Handle_LineInfo() = 0 ;<br />
virtual void Handle_PolyLineInfo() = 0 ;<br />
virtual void Handle_LWPolyLineInfo() = 0;<br />
virtual void Handle_CircleInfo() = 0 ;<br />
virtual void Handle_ArcInfo() = 0 ;<br />
virtual void Handle_TextInfo() = 0 ;<br />
virtual void Handle_MTextInfo() = 0 ;<br />
virtual void Handle_SolidInfo() = 0 ;<br />
virtual void Handle_PointInfo() = 0 ;<br />
virtual void Handle_InsertInfo() = 0 ;<br />
virtual void Handle_SeqendInfo() = 0 ;<br />
virtual void Handle_VertexInfo() = 0 ;<br />
virtual void Handle_EllipseInfo() = 0 ;<br />
virtual void Handle_UnknownInfo() = 0 ;<br />
<br />
};<br />
<br />
#endif // !defined(AFX_DXF_READ_H__0C34F7F9_A3E2_11D2_B76C_CAED36AA095C__INCLUDED_)
************************************************************************
<br />
#include "stdafx.h"<br />
#include "DXF_IN.h"<br />
#include "DXF_READ.h"<br />
<br />
#ifdef _DEBUG<br />
#undef THIS_FILE<br />
static char THIS_FILE[]=__FILE__;<br />
#define new DEBUG_NEW<br />
#endif<br />
<br />
CDXF_FILE::CDXF_FILE()<br />
{<br />
m_fileColse = TRUE;<br />
}<br />
CDXF_FILE::~CDXF_FILE()<br />
{<br />
if(!m_fileColse)<br />
m_file.Close();<br />
}<br />
void CDXF_FILE::Close()<br />
{<br />
m_fileColse = TRUE;<br />
m_file.Close();<br />
}<br />
int CDXF_FILE::Open(LPCSTR sDXF_FILE)<br />
{<br />
CFileException e;<br />
if( !m_file.Open(sDXF_FILE,CFile::modeRead|CFile::typeText, &e ) )<br />
{<br />
#ifdef _DEBUG<br />
afxDump << "File could not be opened " << e.m_cause << "\n";<br />
#endif<br />
return ER_NOSUCHFILE;<br />
}<br />
m_fileColse = FALSE;<br />
return 0;<br />
}<br />
double CDXF_FILE::ReadDouble()<br />
{<br />
char *p;<br />
m_file.ReadString(m_str);<br />
m_str.TrimRight();<br />
return strtod(m_str,&p);<br />
}<br />
float CDXF_FILE::ReadFloat()<br />
{<br />
m_file.ReadString(m_str);<br />
m_str.TrimRight();<br />
return (float)atof(m_str);<br />
}<br />
__int8 CDXF_FILE::ReadInt8()<br />
{<br />
return (__int8)ReadInt32();<br />
}<br />
__int16 CDXF_FILE::ReadInt16()<br />
{<br />
return (__int16)ReadInt32();<br />
}<br />
__int32 CDXF_FILE::ReadInt32()<br />
{<br />
char *p;<br />
m_file.ReadString(m_str);<br />
m_str.TrimLeft();<br />
return strtol(m_str,&p,10);<br />
}<br />
BOOL CDXF_FILE::ReadString(CString& m_Str)<br />
{<br />
BOOL a=m_file.ReadString(m_str);<br />
m_Str = m_str;<br />
return a;<br />
}<br />
BOOL CDXF_FILE::EndOfFile()<br />
{<br />
return BOOL( feof(m_file.m_pStream) );<br />
}<br />
<br />
int CDXF_READ::Open_DXF_File()<br />
{<br />
return fileDXF.Open(sDXF_FILE);<br />
}<br />
<br />
CDXF_READ::CDXF_READ()<br />
{<br />
Line_No_Dxf_Read =0;<br />
GroupCircle = FALSE;<br />
EndOfFileReached = FALSE ;<br />
LayerCount =0;<br />
NOT_READ_BEFOR = TRUE;<br />
sDXF_FILE="";<br />
}<br />
<br />
CDXF_READ::CDXF_READ(LPCSTR dxf_file)<br />
{<br />
Line_No_Dxf_Read =0;<br />
GroupCircle = FALSE;<br />
EndOfFileReached = FALSE ;<br />
LayerCount =0;<br />
NOT_READ_BEFOR = TRUE;<br />
sDXF_FILE=dxf_file;<br />
}<br />
<br />
CDXF_READ::~CDXF_READ()<br />
{<br />
if(LayerCount )<br />
for(;LayerCount>0;)<br />
delete LayerArray[--LayerCount];<br />
<br />
fileDXF.Close();<br />
<br />
((CDXF_IN_App*) AfxGetApp())->bDoingBackgroundProcessing = FALSE;<br />
}<br />
<br />
int CDXF_READ::Process_DXF(LPCSTR dxf_file)<br />
{<br />
if(dxf_file!=NULL)<br />
sDXF_FILE=dxf_file;<br />
else if (sDXF_FILE.IsEmpty())<br />
return ER_INVALIDFILENAME ;<br />
<br />
int result; <br />
result=Open_DXF_File();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
<br />
result=Process_Header();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
result=Process_Tables();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
result=Process_Blocks();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
result=Process_Entites();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
result=Process_EndOfFile();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
<br />
return 0;<br />
}<br />
int CDXF_READ::Process_Free_DXF(LPCSTR dxf_file)<br />
{<br />
if(dxf_file!=NULL)<br />
sDXF_FILE=dxf_file;<br />
else if (sDXF_FILE.IsEmpty())<br />
return ER_INVALIDFILENAME ;<br />
<br />
int result; <br />
result=Open_DXF_File();<br />
if(result < ER_WARNNIG)<br />
return result;<br />
do<br />
{<br />
if(!ProcessSystemMsg())<br />
return 0;<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==0 && Rec.m_string=="SECTION")<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
{<br />
if(Rec.what==2 && Rec.m_string=="HEADER")<br />
{<br />
NOT_READ_BEFOR=FALSE;<br />
result=Process_Header(FALSE);<br />
if(result < ER_WARNNIG)<br />
return result; <br />
}else<br />
if(Rec.what==2 && Rec.m_string=="TABLES")<br />
{<br />
NOT_READ_BEFOR=FALSE;<br />
result=Process_Tables(FALSE);<br />
if(result < ER_WARNNIG)<br />
return result; <br />
}else<br />
if(Rec.what==2 && Rec.m_string=="BLOCKS")<br />
{<br />
NOT_READ_BEFOR=FALSE;<br />
result=Process_Blocks(FALSE);<br />
if(result < ER_WARNNIG)<br />
return result; <br />
}else<br />
if(Rec.what==2 && Rec.m_string=="ENTITIES")<br />
{<br />
NOT_READ_BEFOR=FALSE;<br />
result=Process_Entites(FALSE);<br />
if(result < ER_WARNNIG)<br />
return result; <br />
}<br />
}else<br />
if(Rec.what==0 && Rec.m_string=="EOF")<br />
{<br />
EndOfFileReached = TRUE ;<br />
return 0;<br />
}<br />
}<br />
}while(!fileDXF.EndOfFile());<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Process_Header(BOOL READ_SECTION)<br />
{<br />
BOOL HeaderFound=FALSE;<br />
if(READ_SECTION)<br />
while(Read_DXF_Line()!=ER_BADVALUE)<br />
if((Rec.what==0 && Rec.m_string=="SECTION"))<br />
break; <br />
<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==2 && Rec.m_string=="HEADER")<br />
{<br />
HeaderFound=TRUE;<br />
}else<br />
return ER_VOIDHEADER ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==0 && Rec.m_string=="ENDSEC")<br />
{<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile());<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Process_Tables(BOOL READ_SECTION)<br />
{<br />
BOOL TablesFound=FALSE;<br />
if(READ_SECTION)<br />
while(Read_DXF_Line()!=ER_BADVALUE)<br />
if((Rec.what==0 && Rec.m_string=="SECTION"))<br />
break; <br />
<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==2 && Rec.m_string=="TABLES")<br />
{<br />
TablesFound=TRUE;<br />
}else<br />
return ER_VOIDENTITY ;<br />
BOOL TABLE_START = FALSE;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if( Rec.what==0)<br />
{<br />
if( Rec.m_string=="TABLE")<br />
{<br />
Tables.group[0] = 0;<br />
Tables.max_item = 0;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
{<br />
switch( Rec.what)<br />
{<br />
case 2:<br />
strncpy(Tables.group , Rec.m_string,255);<br />
Tables.group[255] = 0;<br />
break;<br />
case 70:<br />
Tables.max_item = Rec.m_int16;<br />
TABLE_START = TRUE;<br />
break;<br />
}<br />
} <br />
}while(!TABLE_START);<br />
CString GroupName(Tables.group);<br />
if(GroupName == "DIMSTYLE")<br />
{ Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "VPORT")<br />
{Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "LTYPE")<br />
{ Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "LAYER")<br />
{<br />
Parse_LayerInfo();<br />
}<br />
else<br />
if(GroupName == "STYLE")<br />
{ Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "UCS")<br />
{ Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "VIEW")<br />
{ Parse_TableItemInfo() ; }<br />
else<br />
if(GroupName == "VPORT")<br />
{ Parse_TableItemInfo() ; }<br />
}else<br />
if( Rec.m_string=="ENDTAB" )<br />
{<br />
TABLE_START = FALSE;<br />
}else<br />
if( Rec.m_string=="ENDSEC")<br />
{<br />
break;<br />
}<br />
}else<br />
return ER_NOTABLEHEADER;<br />
}while(!fileDXF.EndOfFile());<br />
<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Process_Blocks(BOOL READ_SECTION)<br />
{<br />
BOOL BlocksFound=FALSE;<br />
if(READ_SECTION)<br />
while(Read_DXF_Line()!=ER_BADVALUE)<br />
if((Rec.what==0 && Rec.m_string=="SECTION"))<br />
break; <br />
<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==2 && Rec.m_string=="BLOCKS")<br />
{<br />
BlocksFound=TRUE;<br />
}else<br />
return ER_VOIDBLOCKS ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==0 && Rec.m_string=="ENDSEC")<br />
{<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile());<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Process_Entites(BOOL READ_SECTION)<br />
{<br />
BOOL EntityFound=FALSE;<br />
if(READ_SECTION)<br />
while(Read_DXF_Line()!=ER_BADVALUE)<br />
if((Rec.what==0 && Rec.m_string=="SECTION"))<br />
break; <br />
<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==2 && Rec.m_string=="ENTITIES")<br />
{<br />
EntityFound=TRUE;<br />
}else<br />
return ER_VOIDENTITY ;<br />
<br />
<br />
BOOL EndSection=FALSE;<br />
do<br />
{<br />
if(!ProcessSystemMsg())<br />
return 0;<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what==0)<br />
if( Rec.m_string=="LINE")<br />
Parse_LineInfo();<br />
else <br />
if( Rec.m_string=="LWPOLYLINE")<br />
Parse_LWPolyLineInfo();<br />
else <br />
if( Rec.m_string=="POLYLINE")<br />
Parse_PolyLineInfo();<br />
else <br />
if( Rec.m_string=="CIRCLE")<br />
Parse_CircleInfo();<br />
else <br />
if( Rec.m_string=="ARC")<br />
Parse_ArcInfo();<br />
else <br />
if( Rec.m_string=="ELLIPSE")<br />
Parse_EllipseInfo();<br />
else <br />
if( Rec.m_string=="TEXT")<br />
Parse_TextInfo();<br />
else <br />
if( Rec.m_string=="MTEXT")<br />
Parse_MTextInfo();<br />
else <br />
if( Rec.m_string=="SOLID")<br />
Parse_SolidInfo();<br />
else <br />
if( Rec.m_string=="POINT")<br />
Parse_PointInfo();<br />
else <br />
if( Rec.m_string=="INSERT")<br />
Parse_InsertInfo();<br />
else <br />
if( Rec.m_string=="SEQEND")<br />
Parse_SeqendInfo();<br />
else <br />
if( Rec.m_string=="VERTEX")<br />
Parse_VertexInfo();<br />
else<br />
if( Rec.m_string=="ENDSEC")<br />
{<br />
EndSection = TRUE; <br />
break;<br />
}<br />
else<br />
Parse_UnknownInfo();<br />
}while(!fileDXF.EndOfFile() );<br />
<br />
if(!EndSection)<br />
return ER_NOENDSEC;<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Process_EndOfFile()<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what ==0 && Rec.m_string=="EOF")<br />
EndOfFileReached = TRUE ;<br />
else<br />
return ER_FILECORRUPT;<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Read_DXF_Line()<br />
{<br />
<br />
if(NOT_READ_BEFOR)<br />
{<br />
Rec.m_double =0.0;<br />
Rec.m_float =0.0;<br />
Rec.m_int16 =0 ;<br />
Rec.m_int32 = 0;<br />
Rec.m_int8 = 0; <br />
Rec.m_string ="";<br />
Rec.what = -1;<br />
}else <br />
{<br />
NOT_READ_BEFOR = TRUE;<br />
return 0;<br />
} <br />
<br />
Line_No_Dxf_Read ++ ;<br />
<br />
Rec.what=fileDXF.ReadInt16();<br />
<br />
Line_No_Dxf_Read ++ ;<br />
<br />
if(Rec.what >=0 && Rec.what <=9 )
fileDXF.ReadString(Rec.m_string);<br />
else<br />
if((Rec.what >=10 && Rec.what <=59 ) ||
(Rec.what >=140 && Rec.what <=147 )||<br />
(Rec.what >=210 && Rec.what <=230 ))
Rec.m_double=fileDXF.ReadDouble();<br />
else<br />
if((Rec.what >=60 && Rec.what <=79) ||
(Rec.what >=170 && Rec.what <=175)||
(Rec.what >=1060 && Rec.what <=1070))
<br />
Rec.m_int16=fileDXF.ReadInt16();<br />
else<br />
if(Rec.what >=90 && Rec.what <=99 )
Rec.m_int32=fileDXF.ReadInt32();<br />
else<br />
if((Rec.what ==100 || Rec.what == 102 || Rec.what == 105 || Rec.what == 999 ) ||<br />
(Rec.what >=300 && Rec.what <=369) || (Rec.what >=1000 && Rec.what <=1009) )<br />
fileDXF.ReadString(Rec.m_string);<br />
<br />
<br />
else<br />
if(Rec.what >=280 && Rec.what <=289 )
Rec.m_int8=fileDXF.ReadInt8();<br />
<br />
else<br />
if(Rec.what >=1010 && Rec.what <=1059 )
Rec.m_float=fileDXF.ReadFloat();<br />
else<br />
{<br />
fileDXF.ReadString(Rec.m_string);<br />
return ER_BADVALUE;<br />
}<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_LineInfo()<br />
{<br />
ZeroMemory(&Line,sizeof(Line));<br />
CurrentGroupName = Rec.m_string ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Line.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
Line.th = Rec.m_double;<br />
break;<br />
case 10:<br />
Line.x1 = Rec.m_double;<br />
break;<br />
case 20:<br />
Line.y1 = Rec.m_double;<br />
break;<br />
case 11:<br />
Line.x2 = Rec.m_double;<br />
break;<br />
case 21:<br />
Line.y2 = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_LineInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_CircleInfo()<br />
{<br />
GroupCircle = TRUE;<br />
ArcCircle.sa = ArcCircle.ea = 0;<br />
Parse_ArcInfo();<br />
GroupCircle = FALSE;<br />
Handle_CircleInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_ArcInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&ArcCircle,sizeof(ArcCircle));<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
ArcCircle.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
ArcCircle.th = Rec.m_double;<br />
break;<br />
case 10:<br />
ArcCircle.x = Rec.m_double;<br />
break;<br />
case 20:<br />
ArcCircle.y = Rec.m_double;<br />
break;<br />
case 40:<br />
ArcCircle.r = Rec.m_double;<br />
break;<br />
case 50:<br />
ArcCircle.sa = Rec.m_double;<br />
break;<br />
case 51:<br />
ArcCircle.ea = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
if(!GroupCircle)<br />
Handle_ArcInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_TextInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&Text,sizeof(Text));<br />
<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Text.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
Text.th = Rec.m_double;<br />
break;<br />
case 10:<br />
Text.x = Rec.m_double;<br />
break;<br />
case 20:<br />
Text.y = Rec.m_double;<br />
break;<br />
<br />
case 40:
Text.h = Rec.m_double;<br />
break;<br />
case 1:
strncpy(Text.text , Rec.m_string,255);<br />
Text.text[255] = 0; <br />
break;<br />
case 50:
Text.rt = Rec.m_double;<br />
break;<br />
case 51:
Text.ob = Rec.m_double;<br />
break;<br />
case 7:<br />
strncpy(Text.style , Rec.m_string,255);<br />
Text.style[255] = 0; <br />
break;<br />
case 71:
Text.gen = Rec.m_int16;<br />
break;<br />
case 72:
Text.hju = Rec.m_int16;<br />
break;<br />
case 73:<br />
Text.vju = Rec.m_int16;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_TextInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_MTextInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&MText,sizeof(MText));<br />
<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
MText.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 10:<br />
MText.x = Rec.m_double;<br />
break;<br />
case 20:<br />
MText.y = Rec.m_double;<br />
break;<br />
case 11:<br />
MText.xdir = Rec.m_double;<br />
break;<br />
case 21:<br />
MText.ydir = Rec.m_double;<br />
break;<br />
case 40:
MText.h = Rec.m_double;<br />
break;<br />
case 41:
MText.refwidth = Rec.m_double;<br />
break;<br />
case 1:
MText.MTextp[MText.MTextn] = new char [Rec.m_string.GetLength()+1] ;<br />
strcpy(MText.MTextp[MText.MTextn] , Rec.m_string);<br />
MText.MTextn ++ ;<br />
break;<br />
case 3:
MText.MTextp[MText.MTextn] = new char [Rec.m_string.GetLength()+1] ;<br />
strcpy(MText.MTextp[MText.MTextn] , Rec.m_string);<br />
MText.MTextn ++ ;<br />
break;<br />
case 50:
MText.rot = Rec.m_double;<br />
break;<br />
case 7:<br />
strncpy(MText.style , Rec.m_string,255);<br />
MText.style[255] = 0; <br />
break;<br />
case 71:
MText.attach = Rec.m_int16;<br />
break;<br />
case 72:
MText.direction = Rec.m_int16;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_MTextInfo();<br />
for(int i=0;i < MText.MTextn ; i++)<br />
delete MText.MTextp[i] ;<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_PointInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&Point,sizeof(Point));<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Point.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
Point.th = Rec.m_double;<br />
break;<br />
case 10:<br />
Point.x = Rec.m_double;<br />
break;<br />
case 20:<br />
Point.y = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_PointInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_SolidInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&Solid,sizeof(Solid));<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Solid.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
Solid.th = Rec.m_double;<br />
break;<br />
case 10:<br />
Solid.x1 = Rec.m_double;<br />
break;<br />
case 20:<br />
Solid.y1 = Rec.m_double;<br />
break;<br />
case 11:<br />
Solid.x2 = Rec.m_double;<br />
break;<br />
case 21:<br />
Solid.y2 = Rec.m_double;<br />
break;<br />
case 12:<br />
Solid.x3 = Rec.m_double;<br />
break;<br />
case 22:<br />
Solid.y3 = Rec.m_double;<br />
break;<br />
case 13:<br />
Solid.x4 = Rec.m_double;<br />
break;<br />
case 23:<br />
Solid.y4 = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_SolidInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_LWPolyLineInfo()<br />
{<br />
<br />
CurrentGroupName = Rec.m_string ;<br />
int vertice_i= -1;<br />
ZeroMemory(&LWPolyLine,sizeof(PolyLine)) ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
LWPolyLine.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 38:<br />
LWPolyLine.elevation = Rec.m_double;<br />
break;<br />
case 39:<br />
LWPolyLine.th = Rec.m_double;<br />
break;<br />
case 43:<br />
LWPolyLine.width = Rec.m_double;<br />
break;<br />
case 90:<br />
LWPolyLine.vertices = Rec.m_int32;<br />
if( LWPolyLine.vertices > 0 )<br />
{<br />
LWPolyLine.pVertices = new VERTICE[LWPolyLine.vertices] ;<br />
ZeroMemory( LWPolyLine.pVertices , sizeof(VERTICE)*LWPolyLine.vertices ) ;<br />
}<br />
break;<br />
case 10:<br />
if( LWPolyLine.vertices > 0 )<br />
{<br />
vertice_i ++ ;<br />
LWPolyLine.pVertices[vertice_i].x = Rec.m_double;<br />
}<br />
break;<br />
case 20:<br />
if( LWPolyLine.vertices > 0 )<br />
LWPolyLine.pVertices[vertice_i].y = Rec.m_double; <br />
break;<br />
case 40:<br />
if( LWPolyLine.vertices > 0 )<br />
LWPolyLine.pVertices[vertice_i].sw = Rec.m_double;<br />
break;<br />
case 41:<br />
if( LWPolyLine.vertices > 0 )<br />
LWPolyLine.pVertices[vertice_i].ew = Rec.m_double;<br />
break;<br />
case 42:<br />
if( LWPolyLine.vertices > 0 )<br />
LWPolyLine.pVertices[vertice_i].bulge = Rec.m_double;<br />
break;<br />
case 70:<br />
LWPolyLine.flag = Rec.m_int16;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
<br />
if( LWPolyLine.width > 0 )<br />
for(vertice_i=0;vertice_i < LWPolyLine.vertices ;vertice_i++)<br />
LWPolyLine.pVertices[vertice_i].sw = LWPolyLine.pVertices[vertice_i].ew = LWPolyLine.width ;<br />
<br />
Handle_LWPolyLineInfo();<br />
if( LWPolyLine.vertices > 0 )<br />
{<br />
delete LWPolyLine.pVertices ;<br />
LWPolyLine.pVertices = NULL ; <br />
return 0;<br />
}<br />
return ER_FILECORRUPT;<br />
}<br />
int CDXF_READ::Parse_PolyLineInfo()<br />
{<br />
<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&PolyLine,sizeof(PolyLine)) ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
PolyLine.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 39:<br />
PolyLine.th = Rec.m_double;<br />
break;<br />
case 10:<br />
PolyLine.x = Rec.m_double;<br />
break;<br />
case 20:<br />
PolyLine.y = Rec.m_double;<br />
break;<br />
case 70:<br />
PolyLine.flag = Rec.m_int16;<br />
break;<br />
case 75:<br />
PolyLine.type = Rec.m_int16;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
<br />
Handle_PolyLineInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_VertexInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&Vertex,sizeof(Vertex)) ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Vertex.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 10:<br />
Vertex.x = Rec.m_double;<br />
break;<br />
case 20:<br />
Vertex.y = Rec.m_double;<br />
break;<br />
case 70:<br />
Vertex.flag = Rec.m_int16;<br />
break;<br />
case 42:<br />
Vertex.bulge = Rec.m_double;<br />
break;<br />
case 40:<br />
Vertex.sw = Rec.m_double;<br />
break;<br />
case 41:<br />
Vertex.ew = Rec.m_double;<br />
break;<br />
case 50:<br />
Vertex.curve = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_VertexInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_SeqendInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Vertex.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_SeqendInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_InsertInfo()<br />
{<br />
<br />
ZeroMemory(&Insert,sizeof(Insert));<br />
Insert.xscale = Insert.yscale = 1;
CurrentGroupName = Rec.m_string ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 10:<br />
Insert.x = Rec.m_double;<br />
break;<br />
case 20:<br />
Insert.y = Rec.m_double;<br />
break;<br />
case 41:<br />
Insert.xscale = Rec.m_double;<br />
break;<br />
case 42:<br />
Insert.yscale = Rec.m_double;<br />
break;<br />
case 44:<br />
Insert.colspc = Rec.m_double;<br />
break;<br />
case 45:<br />
Insert.rowspc = Rec.m_double;<br />
break;<br />
case 50:<br />
Insert.rot = Rec.m_double;<br />
break;<br />
case 70:<br />
Insert.colnum = Rec.m_int16;<br />
break;<br />
case 71:<br />
Insert.rownum = Rec.m_int16;<br />
break;<br />
case 8:<br />
Insert.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 2:<br />
strncpy(Insert.block , Rec.m_string,255);<br />
Insert.block[255] = 0; <br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_InsertInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_UnknownInfo()<br />
{<br />
CurrentGroupName = Rec.m_string ;<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Vertex.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_UnknownInfo();<br />
return 0;<br />
}<br />
int CDXF_READ::Parse_TableItemInfo()<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what == 0 && Rec.m_string != Tables.group)<br />
return ER_BADTABLES;<br />
CurrentGroupName = Tables.group ; <br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 70:<br />
Layer.flag = Rec.m_int16;<br />
break;<br />
case 0:<br />
if(Rec.m_string == "ENDTAB" )<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
return 0;<br />
}<br />
<br />
int CDXF_READ::Parse_LayerInfo()<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
if(Rec.what == 0 && Rec.m_string != Tables.group)<br />
return ER_BADTABLES;<br />
CurrentGroupName = Tables.group ; <br />
ZeroMemory(&Layer,sizeof(Layer));<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 2:<br />
strncpy(Layer.name , Rec.m_string,255);<br />
break;<br />
case 70:<br />
Layer.flag = Rec.m_int16;<br />
break;<br />
case 6:<br />
strncpy(Layer.linetype , Rec.m_string,255);<br />
break;<br />
case 62:<br />
Layer.color = Rec.m_int16;<br />
break;<br />
case 0:<br />
if(Rec.m_string == "ENDTAB" )<br />
NOT_READ_BEFOR = FALSE;<br />
else<br />
{ <br />
LayerArray [ LayerCount ] = new DXF_LAYER;<br />
ZeroMemory(LayerArray [ LayerCount ],sizeof(DXF_LAYER) );<br />
CopyMemory(LayerArray [ LayerCount ],&Layer,sizeof(DXF_LAYER) );<br />
LayerCount++;<br />
Handle_LayerInfo();<br />
}<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
<br />
LayerArray [ LayerCount ] = new DXF_LAYER;<br />
ZeroMemory(LayerArray [ LayerCount ],sizeof(DXF_LAYER) );<br />
CopyMemory(LayerArray [ LayerCount ],&Layer,sizeof(DXF_LAYER) );<br />
LayerCount++;<br />
<br />
Handle_LayerInfo();<br />
return 0;<br />
}<br />
__int16 CDXF_READ::GetLayer(LPCSTR ln)<br />
{<br />
__int16 ret=0; <br />
for(;ret < LayerCount; ret++)<br />
if(stricmp(LayerArray[ret]->name,ln)==0)<br />
return ret;<br />
<br />
LayerArray [ LayerCount ] = new DXF_LAYER;<br />
ZeroMemory(LayerArray [ LayerCount ],sizeof(DXF_LAYER) );<br />
<br />
strcpy(LayerArray [ LayerCount ]->name , ln);<br />
LayerArray [ LayerCount ]->color = -LayerCount ;
LayerArray [ LayerCount ]->flag = 5;
<br />
LayerCount++;<br />
return ret;<br />
}<br />
int CDXF_READ::Parse_EllipseInfo()<br />
{<br />
GroupCircle = FALSE;<br />
CurrentGroupName = Rec.m_string ;<br />
ZeroMemory(&Ellipse,sizeof(DXF_ELLIPSE));<br />
do<br />
{<br />
if(Read_DXF_Line()!=ER_BADVALUE)<br />
switch(Rec.what)<br />
{<br />
case 8:<br />
Ellipse.layer = GetLayer(Rec.m_string);<br />
break;<br />
case 10:<br />
Ellipse.x = Rec.m_double;<br />
break;<br />
case 20:<br />
Ellipse.y = Rec.m_double;<br />
break;<br />
case 11:<br />
Ellipse.mx = Rec.m_double;<br />
break;<br />
case 21:<br />
Ellipse.my = Rec.m_double;<br />
break;<br />
case 40:<br />
Ellipse.rmin = Rec.m_double;<br />
break;<br />
case 41:<br />
Ellipse.sp = Rec.m_double;<br />
break;<br />
case 42:<br />
Ellipse.ep = Rec.m_double;<br />
break;<br />
case 0:<br />
NOT_READ_BEFOR = FALSE;<br />
break;<br />
}<br />
}while(!fileDXF.EndOfFile() && NOT_READ_BEFOR);<br />
Handle_EllipseInfo();<br />
return 0;<br />
}<br />
BOOL CDXF_READ::ProcessSystemMsg()<br />
{<br />
if(((CDXF_IN_App*) AfxGetApp())->bShouldExit)<br />
return FALSE ;<br />
MSG msg;<br />
CDXF_IN_App* theApp =(CDXF_IN_App*) AfxGetApp();<br />
theApp->bDoingBackgroundProcessing = TRUE;<br />
while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) <br />
{ <br />
if ( !theApp->PumpMessage( ) ) <br />
{ <br />
theApp->bDoingBackgroundProcessing = FALSE; <br />
::PostQuitMessage(0 ); <br />
break; <br />
} <br />
} <br />
LONG lIdle = 0;<br />
while ( theApp->OnIdle(lIdle++ ) )<br />
; <br />
return theApp->bDoingBackgroundProcessing;<br />
}
|
|
|
|