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

C / C++ / MFC

 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
Trollslayer19-Jul-05 6:11
mentorTrollslayer19-Jul-05 6:11 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
IGx8919-Jul-05 7:05
IGx8919-Jul-05 7:05 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
Trollslayer19-Jul-05 7:35
mentorTrollslayer19-Jul-05 7:35 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
David Crow19-Jul-05 7:49
David Crow19-Jul-05 7:49 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
James Brown19-Jul-05 7:56
James Brown19-Jul-05 7:56 
GeneralRe: Why does creating a static window from a console app cause havok? Pin
IGx8919-Jul-05 9:34
IGx8919-Jul-05 9:34 
Generalfread crash Pin
sfeldi19-Jul-05 4:40
sfeldi19-Jul-05 4:40 
GeneralRe: fread crash Pin
David Crow19-Jul-05 5:28
David Crow19-Jul-05 5:28 
The first thing I would do is remove, or at least comment out, the GetFileLength() function. Mixing streams and handles is not a good idea at this point. It serves no purpose in trying to figure out why fread() is not working, and anything you can do to make the problem set smaller is only going to help you in the long run.

sfeldi wrote:
if (0>=fread(&chTmp,1,1,file)){

Even though a char is one byte, I would change this to:

fread(&chTmp, sizeof(char), 1, file);
That said, why are you not using CFile or CStdioFile? You'll save yourself a lot of time and grief by doing so.


"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown


GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 6:48
professionalChris Losinger19-Jul-05 6:48 
GeneralRe: fread crash Pin
David Crow19-Jul-05 7:17
David Crow19-Jul-05 7:17 
GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 7:30
professionalChris Losinger19-Jul-05 7:30 
GeneralRe: fread crash Pin
David Crow19-Jul-05 7:40
David Crow19-Jul-05 7:40 
GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 8:03
professionalChris Losinger19-Jul-05 8:03 
GeneralRe: fread crash Pin
David Crow19-Jul-05 8:52
David Crow19-Jul-05 8:52 
GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 9:27
professionalChris Losinger19-Jul-05 9:27 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 20:39
sfeldi19-Jul-05 20:39 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 21:09
sfeldi19-Jul-05 21:09 
GeneralRe: fread crash Pin
Chris Losinger20-Jul-05 1:11
professionalChris Losinger20-Jul-05 1:11 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 20:38
sfeldi19-Jul-05 20:38 
QuestionTextOut being clipped in Windows 2000? Pin
MacWarrior19-Jul-05 3:10
MacWarrior19-Jul-05 3:10 
AnswerRe: TextOut being clipped in Windows 2000? Pin
David Crow19-Jul-05 3:21
David Crow19-Jul-05 3:21 
GeneralReading REG_SZ from Win registry Pin
rudoq3219-Jul-05 3:09
rudoq3219-Jul-05 3:09 
GeneralRe: Reading REG_SZ from Win registry Pin
David Crow19-Jul-05 3:19
David Crow19-Jul-05 3:19 
GeneralRe: Reading REG_SZ from Win registry Pin
Blake Miller19-Jul-05 5:50
Blake Miller19-Jul-05 5:50 
GeneralRe: Reading REG_SZ from Win registry Pin
John R. Shaw20-Jul-05 9:53
John R. Shaw20-Jul-05 9:53 

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.