Click here to Skip to main content
15,891,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionvc++/api Pin
With_problem13-Jul-06 18:39
With_problem13-Jul-06 18:39 
AnswerRe: vc++/api Pin
With_problem13-Jul-06 18:49
With_problem13-Jul-06 18:49 
AnswerRe: vc++/api Pin
_AnsHUMAN_ 13-Jul-06 18:51
_AnsHUMAN_ 13-Jul-06 18:51 
GeneralRe: vc++/api Pin
With_problem13-Jul-06 18:57
With_problem13-Jul-06 18:57 
AnswerRe: vc++/api Pin
With_problem13-Jul-06 19:42
With_problem13-Jul-06 19:42 
QuestionAsk a problem,about inheritance :) Pin
rxgmoral13-Jul-06 18:37
rxgmoral13-Jul-06 18:37 
AnswerRe: Ask a problem,about inheritance :) Pin
earl13-Jul-06 19:02
earl13-Jul-06 19:02 
QuestionProblem in file reading,help me Pin
Anu_Bala13-Jul-06 18:18
Anu_Bala13-Jul-06 18:18 
I have a problem in file reading.When i write to the file,it writes very correct.but during reading it doesn't read anything.
e.g,I have to write some details of SWFLOW,SWT,VCOn,STEMP etc.,the code for writing
struct STagTabFile TabFile;
CDisplay *pTemp;
FILE *fpTab;
if( (fpTab = fopen( szFileName, "w" )) == NULL )
{
MessageBox( "Unable to open" );
return FALSE;
}
for( POSITION indx = DisplayList.FindIndex( GetTopIndex(ActivePage) ); indx != NULL; )
{
pTemp = (CDisplay *) DisplayList.GetAt( indx );
strcpy( TabFile.VarName, (LPCTSTR)pTemp->DisVar );
TabFile.OffSet = pTemp->OffSet;
fwrite( &TabFile, sizeof( struct STagTabFile ), 1, fpTab );
DisplayList.GetNext( indx );
}
fclose( fpTab );
return TRUE;
}
FOr reading,
if( (fpTab = fopen( szFileName, "r" )) == NULL )
{
MessageBox( "Unable to open " );return FALSE;
}
while( fread( &TabFile, sizeof( struct STagTabFile ), 1, fpTab ) )
{
if( ( DisplayBuf = new CDisplay() ) == NULL )
{
MessageBox( "Out Of Memory" );return FALSE;
}
DisplayBuf->DisVar = (CString)TabFile.VarName;
DisplayBuf->OffSet = TabFile.OffSet;
DisplayList.AddTail( DisplayBuf );
PutDataInScreen( DisplayBuf );
} fclose( fpTab );
This is my coding,when i read the values for SWFLOW,SWT,VCON and all other it reads the value perfectly.
In case of STEMP it does not enter in to while loop,it comes out.Whats the reason,if there is any mistake in my coding means it should not read for all variables,but it reads for all variables except STEMP.wats the reason?
AnswerRe: Problem in file reading,help me [modified] Pin
_AnsHUMAN_ 13-Jul-06 18:31
_AnsHUMAN_ 13-Jul-06 18:31 
Questionhello, Pin
With_problem13-Jul-06 18:14
With_problem13-Jul-06 18:14 
AnswerRe: hello, Pin
KellyR13-Jul-06 18:23
KellyR13-Jul-06 18:23 
AnswerRe: hello, Pin
With_problem13-Jul-06 18:51
With_problem13-Jul-06 18:51 
GeneralRe: hello, Pin
earl13-Jul-06 19:08
earl13-Jul-06 19:08 
GeneralRe: hello, Pin
With_problem13-Jul-06 19:21
With_problem13-Jul-06 19:21 
GeneralRe: hello, Pin
*Dreamz13-Jul-06 19:29
*Dreamz13-Jul-06 19:29 
GeneralRe: hello, Pin
earl13-Jul-06 19:46
earl13-Jul-06 19:46 
Questionhow to add space to a string Pin
Joy Anne13-Jul-06 17:27
Joy Anne13-Jul-06 17:27 
AnswerRe: how to add space to a string Pin
Code_Zombie13-Jul-06 17:36
Code_Zombie13-Jul-06 17:36 
AnswerRe: how to add space to a string Pin
see me13-Jul-06 17:37
see me13-Jul-06 17:37 
AnswerRe: how to add space to a string Pin
KellyR13-Jul-06 18:34
KellyR13-Jul-06 18:34 
Questioncan tab control join project togehter? Pin
mimimimilaw13-Jul-06 17:21
mimimimilaw13-Jul-06 17:21 
AnswerRe: can tab control join project togehter? Pin
see me13-Jul-06 17:44
see me13-Jul-06 17:44 
GeneralRe: can tab control join project togehter? Pin
mimimimilaw13-Jul-06 17:47
mimimimilaw13-Jul-06 17:47 
GeneralRe: can tab control join project togehter? Pin
Abhi Lahare13-Jul-06 18:02
Abhi Lahare13-Jul-06 18:02 
QuestionLimiting # of columns in multi-column listbox Pin
KellyR13-Jul-06 17:15
KellyR13-Jul-06 17:15 

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.