TXTTopMarg Example for C++ 5.0 and later
void Demo::LoadTxtFile()
{
//This example loads a TXT file, with a top margin, bottom margin, left margin, right margin ,font color, font size and bold formatting defined by the user
ILEADRasterIO * pRasterIO = NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);
//Change TXT Options values
pRasterIO->TXTTopMarg = 1;
pRasterIO->TXTBottomMarg = 1;
pRasterIO->TXTRightMarg = 1.5;
pRasterIO->TXTLeftMarg = 1.5;
pRasterIO->TXTPaperWidth = 10;
pRasterIO->TXTPaperHeight = 10;
pRasterIO->TXTFaceName = "Arial";
pRasterIO->TXTFontSize = 12;
pRasterIO->TXTFontColor = RGB(255, 0, 0);
pRasterIO->TXTHighlight = RGB(0, 0, 255);
pRasterIO->TXTStrikeThrough = FALSE;
pRasterIO->TXTBold = TRUE;
pRasterIO->TXTItalic = FALSE;
pRasterIO->TXTUnderLine = FALSE;
pRasterIO->TXTEnabled = TRUE;
// Now load the TXT file
pRasterIO->Load(m_RasterView.GetRaster(), TEXT("c:\\1.txt"), 0, 0, 1);
if(pRasterIO)
{
pRasterIO->Release();
}
}