색상을 변경하는 예제입니다.
ULong elemAddr[50], eofPos, filePos;
int scanWords, numChanged=0, status, i, numAddr;
Scanlist scanList;
int grayColor = 32;
MSElementUnion el;
mdlScan_initScanlist (&scanList);
mdlScan_noRangeCheck (&scanList);
scanList.extendedType = FILEPOS;
mdlScan_initialize (0, &scanList);
do
{
scanWords = sizeof(elemAddr)/sizeof(short);
status = mdlScan_file (elemAddr, &scanWords, sizeof(elemAddr), &filePos);
numAddr = scanWords / sizeof(short);
for (i=0; i<numAddr; i++)
{
mdlElement_read(&el, 0, elemAddr[i] );
mdlElement_setSymbology(&el , &grayColor , NULL , NULL);
mdlElement_rewrite(&el , NULL , elemAddr[i]);
}
} while (status == BUFF_FULL);
댓글
댓글 쓰기