|
-
Aug 2nd, 2002, 04:37 PM
#1
Thread Starter
Fanatic Member
weird looping problem
Code:
registry.Open(HKEY_CURRENT_USER, _T("Software\\VB and VBA Program Settings\\fbserver\\settings"), FALSE);
registry.Read("total",num);
registry.Open(HKEY_CURRENT_USER, _T("Software\\VB and VBA Program Settings\\fbserver\\titles"), FALSE);
for(int i=1;i<=num;i++){
registry.Read(itoa(i,buffer,10),title);
lst_favs.AddString(title);
}
registry.Close();
when i add to the list box, itll add the last one alot of times, maybe 30 or 40 times. anyone have any idea why?
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 2nd, 2002, 05:08 PM
#2
PowerPoster
How is your registry.Read function written?
-
Aug 2nd, 2002, 05:12 PM
#3
Thread Starter
Fanatic Member
i didn't write it, but here it is:
Code:
BOOL CRegisterWIN32::Read(LPCTSTR szKey, LPTSTR &pszValue)
{
BOOL bResult = FALSE;
try
{
if ( StringIN(szKey) )
{
//** The Key exist so proceed
if( pszValue != NULL )
delete pszValue;
//** We re-allocate memory on destination pointer
pszValue = new _TCHAR[_tcslen(m_szTemp) + 1 * sizeof(TCHAR)];
//** Transfert the reading result
_tcscpy(pszValue, m_szTemp);
bResult = TRUE;
}
}
catch(...)
{
bResult = FALSE;
}
return bResult;
}
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Aug 2nd, 2002, 05:13 PM
#4
Thread Starter
Fanatic Member
nevermind i fixed it:
Code:
if(!registry.Read(itoa(i,buffer,10),title)){
break;
}
lst_favs.AddString(title);
did that instead
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|