Click here to Skip to main content
16,015,641 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: TransparentBlt error... Pin
Rickard Andersson205-Apr-02 3:09
Rickard Andersson205-Apr-02 3:09 
Questionwhats wrong with this? Pin
Mazdak4-Apr-02 22:47
Mazdak4-Apr-02 22:47 
AnswerRe: whats wrong with this? Pin
jan larsen4-Apr-02 23:33
jan larsen4-Apr-02 23:33 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 0:28
Mazdak5-Apr-02 0:28 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 0:33
protectorChristian Graus5-Apr-02 0:33 
GeneralRe: whats wrong with this? Pin
jan larsen5-Apr-02 2:57
jan larsen5-Apr-02 2:57 
AnswerRe: whats wrong with this? Pin
alex.barylski4-Apr-02 23:34
alex.barylski4-Apr-02 23:34 
AnswerRe: whats wrong with this? Pin
Christian Graus4-Apr-02 23:46
protectorChristian Graus4-Apr-02 23:46 
The first thing that's wrong with it is that it is ugly as all hell. Why on earth are you using malloc and fread when you're using MFC, so you must be using C++ ?

You should use iostreams in C++, you should ALWAYS prefer C++ code to C code unless you have a real reason not to, and NEVER use malloc/free.

Try this:

CFileStatus fs;

CFile::GetStatus("c:\\myfile.ext", fs);

CString s;
s.Format("File length = %d bytes", fs.m_szie);
AfxMessageBox(s);







Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
GeneralRe: whats wrong with this? Pin
Mazdak4-Apr-02 23:55
Mazdak4-Apr-02 23:55 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 0:07
protectorChristian Graus5-Apr-02 0:07 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 0:19
Mazdak5-Apr-02 0:19 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 0:30
protectorChristian Graus5-Apr-02 0:30 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 0:59
Mazdak5-Apr-02 0:59 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 1:46
Mazdak5-Apr-02 1:46 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 9:57
protectorChristian Graus5-Apr-02 9:57 
AnswerRe: whats wrong with this? Pin
Jon Hulatt5-Apr-02 5:51
Jon Hulatt5-Apr-02 5:51 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 6:11
Mazdak5-Apr-02 6:11 
GeneralNetmessagebuffersend(): this is strange! Pin
Jörg Anslik4-Apr-02 21:42
Jörg Anslik4-Apr-02 21:42 
GeneralDirectShow StillCap problem Pin
Ruzicka4-Apr-02 21:37
Ruzicka4-Apr-02 21:37 
Generalbasic_string Pin
Niklas L4-Apr-02 21:37
Niklas L4-Apr-02 21:37 
GeneralRe: basic_string Pin
Niklas L4-Apr-02 21:39
Niklas L4-Apr-02 21:39 
GeneralRe: basic_string Pin
Joaquín M López Muñoz4-Apr-02 22:32
Joaquín M López Muñoz4-Apr-02 22:32 
GeneralRe: basic_string Pin
Joao Vaz4-Apr-02 23:49
Joao Vaz4-Apr-02 23:49 
GeneralRe: basic_string Pin
Tim Smith5-Apr-02 3:48
Tim Smith5-Apr-02 3:48 
GeneralRe: basic_string Pin
Joao Vaz5-Apr-02 4:56
Joao Vaz5-Apr-02 4:56 

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.