Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to force the control to redraw? Pin
ytod4-Dec-04 3:44
ytod4-Dec-04 3:44 
AnswerRe: How to force the control to redraw? Pin
User 66584-Dec-04 4:22
User 66584-Dec-04 4:22 
AnswerRe: How to force the control to redraw? Pin
John R. Shaw4-Dec-04 10:54
John R. Shaw4-Dec-04 10:54 
GeneralFile stream as function parameter Pin
vilmer3-Dec-04 22:16
vilmer3-Dec-04 22:16 
GeneralRe: File stream as function parameter Pin
toxcct3-Dec-04 22:21
toxcct3-Dec-04 22:21 
GeneralRe: File stream as function parameter Pin
ThatsAlok3-Dec-04 22:26
ThatsAlok3-Dec-04 22:26 
GeneralRe: File stream as function parameter Pin
Michael Dunn4-Dec-04 9:05
sitebuilderMichael Dunn4-Dec-04 9:05 
GeneralRe: File stream as function parameter Pin
Mohammad A Gdeisat5-Dec-04 6:04
Mohammad A Gdeisat5-Dec-04 6:04 
Hi friend,

I tried making a program and i got it worked for both release and debug modes

I don't know whats the problem in your code, but for ensurance here is my code and you can compare:

<br />
#include <stdio.h><br />
<br />
void f1(FILE *f)<br />
{<br />
<br />
	while (!feof(f))<br />
	{<br />
		char s[256];<br />
		fgets(s,255,f);<br />
		printf("%s",s);<br />
	}<br />
}<br />
<br />
<br />
void f2(FILE *f)<br />
{<br />
<br />
	while (!feof(f))<br />
	{<br />
		char s[256];<br />
		fgets(s,255,f);<br />
		printf("%s",s);<br />
	}<br />
}<br />
<br />
main()<br />
{<br />
	FILE *file;<br />
	file=fopen("c:\\dlls.txt","r");<br />
	f1(file);<br />
	f2(file);<br />
	fcloseall();<br />
}<br />

Here are some advices:
1. may be you should check other parts of your program
2. you should use the object-oriented new C++ classes like ifstream
3. may be if two threads are trying to access the same file simaltanously a failure will occur.
4. you should check the return values from the functions like fopen and others to locate the bug.

I dont know if this helps, but it is all i can do for you friend.

Yours,
Mohammad

a candle looses nothing by lighting another candle
GeneralRe: File stream as function parameter Pin
vilmer6-Dec-04 4:19
vilmer6-Dec-04 4:19 
GeneralRe: File stream as function parameter Pin
Mohammad A Gdeisat6-Dec-04 9:06
Mohammad A Gdeisat6-Dec-04 9:06 
GeneralOne mesage in my application is causing crash Pin
vcseeker3-Dec-04 21:05
vcseeker3-Dec-04 21:05 
GeneralRe: One mesage in my application is causing crash Pin
toxcct4-Dec-04 0:27
toxcct4-Dec-04 0:27 
GeneralRe: One mesage in my application is causing crash Pin
ThatsAlok4-Dec-04 1:42
ThatsAlok4-Dec-04 1:42 
GeneralCrash while doing drag and drop. Pin
vcseeker3-Dec-04 20:41
vcseeker3-Dec-04 20:41 
GeneralProblem moving mfc dll to another machine Pin
hemenders3-Dec-04 18:03
hemenders3-Dec-04 18:03 
GeneralRe: Problem moving mfc dll to another machine Pin
ThatsAlok3-Dec-04 19:53
ThatsAlok3-Dec-04 19:53 
GeneralRe: Problem moving mfc dll to another machine Pin
Michael Dunn4-Dec-04 9:10
sitebuilderMichael Dunn4-Dec-04 9:10 
GeneralRe: Problem moving mfc dll to another machine Pin
hemenders4-Dec-04 18:22
hemenders4-Dec-04 18:22 
GeneralBarCode progam Pin
akira323-Dec-04 16:34
akira323-Dec-04 16:34 
GeneralRe: BarCode progam Pin
ThatsAlok3-Dec-04 22:16
ThatsAlok3-Dec-04 22:16 
GeneralDirectX3D Book Pin
akira323-Dec-04 16:23
akira323-Dec-04 16:23 
GeneralRe: DirectX3D Book Pin
Stanciu Vlad4-Dec-04 9:41
Stanciu Vlad4-Dec-04 9:41 
GeneralToolTip rect size Pin
lowiq3-Dec-04 16:07
lowiq3-Dec-04 16:07 
GeneralRe: ToolTip rect size Pin
alex.barylski4-Dec-04 2:32
alex.barylski4-Dec-04 2:32 
GeneralResizing a static variable Pin
digwizfox3-Dec-04 14:50
digwizfox3-Dec-04 14:50 

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.