Thank you for your efforts, I believe I am almost there.
After creating a bitmap base, I got some different error codes regarding dlls not being loaded, I researched your forums regarding that error message and I have the LoadFile calls returning '1' ( i & j )
However, the SaveFile calls ( in red below) are returning -1002 ( k & l ) parameter error again. The filename c:\test\multi.tif does not exist, could that be causing the save to fail????
//bcj load all of the dll's...
if ( ( LBase::LoadLibraries( LT_ALL_LEADLIB ) & LT_ALL_LEADLIB ) == 0L )
{
AfxMessageBox( _T( "Unable to load the Lead Tools Screen Library." ) );
return ESTUB_EMPTY_STRING;
}
LFile leadFront;
LFile leadBack;
LBitmapBase LeadBitmapFront;
LBitmapBase LeadBitmapBack;
leadFront.SetBitmap(&LeadBitmapFront);
leadBack.SetBitmap(&LeadBitmapBack);
csFront = "C:\\test\\1.tif";
csBack = "C:\\test\\2.tif";
csMulti = "C:\\test\\multi.tif";
leadFront.SetFileName( (LPTSTR)(LPCSTR)csFront ); //this requires a char *, we only have cstrings...
leadBack.SetFileName( (LPTSTR)(LPCSTR)csBack );
//have to load the file into object.
int i = leadFront.LoadFile(0, LOADFILE_ALLOCATE|LOADFILE_STORE, 0, 0, NULL);
int j = leadBack.LoadFile( 0, LOADFILE_ALLOCATE|LOADFILE_STORE, 0, 0, NULL);
//change the file name in the object...
leadFront.SetFileName( (LPTSTR)(LPCSTR)csMulti );
leadBack.SetFileName( (LPTSTR)(LPCSTR)csMulti );
//saving to multi-page tiff...
int k = leadFront.SaveFile(FILE_TIF, 0 , 0, SAVEFILE_MULTIPAGE, NULL );
int l = leadBack.SaveFile(FILE_TIF, 0 , 0, SAVEFILE_MULTIPAGE, NULL );