void LoadList()
{
char szBuffer[MAX_STRING] = {0}, szSection[MAX_STRING] = {0}, szCrackName[MAX_STRING] = {0};
int i, prev = 0, curListIndex = 0;
DWORD crack_color;
CrackList->DeleteAll();
DebugSpewAlways("CDoCrackWnd::LoadList(): Get sections list");
GetPrivateProfileString(NULL, NULL, NULL, szBuffer, MAX_STRING, INIFileName);
for (i = 0; ((szBuffer != 0) || (szBuffer[i+1] != 0)); i++)
{
//DebugSpewAlways("LoadList(): cycledsectionbuffer byte %d", i);
szSection[i-prev] = szBuffer;
if (szBuffer == 0)
{
//DebugSpewAlways("LoadList(): found section %s", szSection);
strcpy(szCrackName, szSection);
char szTmp[MAX_STRING] = {0};
sprintf(szTmp, "Settings_");
if (!strncmp(szCrackName, szTmp, 9)) return;
//crack_color = GetCrackStatusColor(szCrackName);
//crack_color = ConColorToARGB(CDoCrackOb.GetCrackStatus(szCrackName));
switch (CDoCrackOb.GetCrackStatus(szCrackName))
{
case CRACKSTATUS_ON:
crack_color = 0xFF00FF00;
break;
case CRACKSTATUS_OFF:
crack_color = 0xFF0000FF;
break;
case CRACKSTATUS_ERROR:
default:
crack_color = 0xFFFF0000;
}
DebugSpewAlways("LoadList(): CrackList->AddString(text='%s',crack_color=0x%X)", szCrackName, crack_color);
CrackList->AddString(szCrackName, crack_color, 0, 0);
curListIndex++;
prev = i+1;
}
}
}