|
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 />
}
|
|
|
|
|
Does anyone now about MFC/Win32 API to get and set the File Properties in the summary tab like, Subject, Title, Category etc.
The closest I was able to get was DSOFile library(dll) provided by Microsoft but I don't want to use a third part library (which I will have to ship along with my binaries).
Any API valid for Windows NT/2000 to get File->Proprties-.Summary will be highly beneficial.
Thanks and Regards,
Amol
Amol
|
|
|
|
|
|
Thanks a lot Mike for the help.
I was successfully able to get summary and custom information out of this.
But I have one problem with this regards. The file (format) whose File->Properties I want to extract has something called "Configurations" in addition to "General", "Summary", and "Custom" tabs in it's File properties.
This TAB is exactly the same as "Custom" tab in File->Properties. The help documentation of my file-format mentions that these properties are written to the file in an 'OLE Property' way. But the source code you provided doesnot mentions any way to get the "user-defined" tab information.
Can you please help me out in extracting such information of a file.
Best wishes and Regards,
Amol
|
|
|
|
|
i have C library which i need to invoke from c++ class
but when i tried to invoke the functions of the c library i am getting linker error of particlar function
Can anybody help
thanx
|
|
|
|
|
When you declare the function, wrap it in an extern "C":
<br />
extern "C" {<br />
extern void the_c_function() ; <br />
}<br />
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.1.5 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Thanx for reply
This should be in library or in my class if so i don't have c library source code
then how can modify it
thax..
|
|
|
|
|
Wrap the header file:
<br />
extern "C" {<br />
#include "api.h"<br />
}<br />
Or just duplicate the declarations you want.
If you're writing a C library, it's good form to put the extern "C" *inside* the header file but not every one does it.
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.1.5 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi there,
I have a problem with the MS Access ODBC driver.
My code looks something like this
First, i open the database using the Acces driver
CDatabase database;
CString SqlString;
CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CString sDsn;
CString sFile = "d:\\MyDB\\MyDB.mdb";
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile);
database.Open(NULL,false,false,sDsn);
Then I create the recordset (the class MyRS is derived from CRecordset)
MyRS rs (&database);
SqlString = "SELECT * From Table1";
What works:
rs.Open(CRecordset::forwardOnly, SqlString);
THis however does not allow using MoveFirst, MoveNext and so on nor to edit and updata records.
These two do not work. I get told that the driver does not support dynamic or dynaset pointers.
rs.Open( CRecordset::dynaset, SqlString, CRecordset::none );
rs.Open( CRecordset::dynamic, SqlString, CRecordset::none );
This works, and I can edit and move back and forward in the recordset, but i cannot filter the recordset with an Sql statement:
rs.Open( CRecordset::snapshot);
does not work : rs.Open( CRecordset::snapshot, SqlStatement);
I did not find in the MSDN that the driver i use does not support dynasets.
Thanks a lot
ch
rs.Open( CRecordset::dynamic, SqlString, CRecordset::none );
|
|
|
|
|
i am student. i have a need of fortran programing language. my aim is made syntex analyser of the language as an assignment if i got it i simply implement using c++ routines.
|
|
|
|
|
hello,
please give some sites.. which gives tips,code,example etc... to build the install shield for my software project ...which is developed in VC++,VB on windows platform....
actually i have zero knowledge of Install Shield use..
so want help...on line...
waiting for early reply.
thanking u.
skpanda
|
|
|
|
|
Article on CodeProject
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
|
http://installshield.com/
This has a very good knowledge base and will answer every question of yours.
East
|
|
|
|
|
Hi,I am a programme-loving.But at recently programme development ,I have meet a headache problem,I search all
the MSDN and use google to search all for nothing.
Who can you help me how to enumerate Windows CE process
Thank !
|
|
|
|
|
is there any way to determine a window has standard scrollbar or scrollbar control? in other word, how to scroll a window that does not belong to my app?
|
|
|
|
|
Try sending WM_HSCROLL and WM_VSCROLL Messages to that Window
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
sure, you are right
but i want to get some information about the scrollbar(range,pos etc.)
Do you know how can i do it???
thanks
|
|
|
|
|
Why don't you use GetScrollRange with the HWND of scroll bar
MSDN says
If the specified window does not have standard scroll bars or is not a scroll bar control, the GetScrollRange function copies zero to the lpMinPos and lpMaxPos parameters.
this might help
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
MailMonty,
thanks for your reply,
I have tried to use GetScrollRange but nothing happened,
the min&max of the range are both zero
but i want to get the range and scroll it exactly
have you any good idea?
|
|
|
|
|