Hello all,
Function <b>CreateCADEx</b> has been added to CADImage.dll (available on:
http://www.cadsofttools.com/download/CADImage.zip).
The <b>CreateCADEx</b> function creates a new CADImage object and loads it from the specified file.
<b><i>HANDLE CreateCADEx</i></b>(
<b>HWND</b> hWindow, // handle of application main window
<b>LPCSTR</b> lpFileName, // pointer to file name
<b>LPCSTR</b> lpExt
);
<b>Parameters</b>
<i>hWindow</i>
Identifies the window that will get system messages during the loading of file. Usually it is the main window of client application. If no file is specified, <i>hWindow</i> can be NULL.
<i>lpFileName</i>
Points to a null-terminated string that specifies the CAD file name to be loaded. If this parameter is NULL, no file is loaded and the empty CADImage object is created.
<i>lpExt</i>
Points to a null-terminated string that specifies an extension for CAD file name to be loaded.
<b>Note</b>:
If <i>lpExt</i> is equal to the one of the following extensions: ( '.dxf', '.dwg', '.plt', '.hgl', '.rtl', '.hg', '.plo', '.hp', '.hp1', '.hp2', '.hpg', '.hpgl', '.hpgl2', '.gl2', '.prn', '.spl', '.svg', '.cgm') then specified by <i>lpFileName</i> and <i>lpExt</i> file will be loaded to the created CADImage object.
If <i>lpExt</i> is not equal then extension in <i>lpFileName</i> will be checked. If it will be equal to the one of mentioned above then file specified in <i>lpFileName</i> will be loaded to the created CADImage object.
If extension in neither <i>lpExt</i> nor <i>lpFileName</i> are not equal to the one of mentioned above then function fail.
Parameter <i>lpExt</i> is ignored if filename in <i>lpFileName</i> parameter specifies with extension.
<b>Return values</b>
If the function succeeds, the return value is a handle of new CADImage object.
If the function fails, the return value is <b>NULL</b>. To get extended error information, call <b>GetLastErrorCAD</b>.
Sergey.
please post questions to the forum or write to
support@cadsofttools.com