Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: .cpp .dsp .dsw Pin
Michael Dunn12-Dec-03 14:51
sitebuilderMichael Dunn12-Dec-03 14:51 
QuestionWhy doesn't this work? Pin
Snyp12-Dec-03 13:45
Snyp12-Dec-03 13:45 
AnswerRe: Why doesn't this work? Pin
valikac13-Dec-03 5:31
valikac13-Dec-03 5:31 
GeneralSendMessage Problem Pin
impeham12-Dec-03 13:45
impeham12-Dec-03 13:45 
GeneralRe: SendMessage Problem Pin
Ernesto D.12-Dec-03 15:28
Ernesto D.12-Dec-03 15:28 
GeneralRe: SendMessage Problem Pin
impeham12-Dec-03 22:03
impeham12-Dec-03 22:03 
GeneralProblem reading field in .ini file Pin
IrishSonic12-Dec-03 13:29
IrishSonic12-Dec-03 13:29 
GeneralRe: Problem reading field in .ini file Pin
Roger Stewart12-Dec-03 15:23
professionalRoger Stewart12-Dec-03 15:23 
You should break out of the loop, otherwise you will keep reading until you get to the end of the file.

while( infile.getline( szLine,256,'\n' ) )
{
   if( strncmp( szLine,Database,strlen( Database ) ) == 0 )
   {
      DatabaseName = &szLine[strlen(Database)+1];
      AfxMessageBox( DatabaseName );
      <code>break;</code>   // Break out here
   }
}


You could write this using much less code by calling GetPrivateProfileString[^]




Roger Stewart
"I Owe, I Owe, it's off to work I go..."

Generalencrypted data and strings Pin
(Steven Hicks)n+112-Dec-03 12:56
(Steven Hicks)n+112-Dec-03 12:56 
GeneralRe: encrypted data and strings Pin
l a u r e n12-Dec-03 20:23
l a u r e n12-Dec-03 20:23 
GeneralRe: encrypted data and strings Pin
(Steven Hicks)n+113-Dec-03 7:55
(Steven Hicks)n+113-Dec-03 7:55 
GeneralRe: encrypted data and strings Pin
l a u r e n13-Dec-03 7:58
l a u r e n13-Dec-03 7:58 
GeneralRe: encrypted data and strings Pin
(Steven Hicks)n+113-Dec-03 8:14
(Steven Hicks)n+113-Dec-03 8:14 
GeneralRe: encrypted data and strings Pin
l a u r e n13-Dec-03 8:17
l a u r e n13-Dec-03 8:17 
GeneralRe: encrypted data and strings Pin
(Steven Hicks)n+113-Dec-03 8:26
(Steven Hicks)n+113-Dec-03 8:26 
GeneralXML with MFC Pin
K. Gulden12-Dec-03 12:19
K. Gulden12-Dec-03 12:19 
GeneralRe: XML with MFC Pin
(Steven Hicks)n+112-Dec-03 12:59
(Steven Hicks)n+112-Dec-03 12:59 
GeneralRe: XML with MFC Pin
K. Gulden12-Dec-03 13:27
K. Gulden12-Dec-03 13:27 
GeneralRe: XML with MFC Pin
Jack Puppy12-Dec-03 13:31
Jack Puppy12-Dec-03 13:31 
GeneralRe: XML with MFC Pin
Ravi Bhavnani12-Dec-03 20:55
professionalRavi Bhavnani12-Dec-03 20:55 
GeneralRe: XML with MFC Pin
K. Gulden15-Dec-03 7:14
K. Gulden15-Dec-03 7:14 
Generalmenuiteminfo question Pin
ns12-Dec-03 10:09
ns12-Dec-03 10:09 
GeneralRe: menuiteminfo question Pin
PJ Arends12-Dec-03 10:55
professionalPJ Arends12-Dec-03 10:55 
GeneralRe: menuiteminfo question Pin
nss12-Dec-03 19:05
nss12-Dec-03 19:05 
GeneralLocal IPC Java App &lt;--&gt; C++ DLL Pin
ReneDalsgaard12-Dec-03 8:12
ReneDalsgaard12-Dec-03 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.