Click here to Skip to main content
16,011,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to clear the screen in DOS Pin
CreepingFeature1-Aug-04 20:35
CreepingFeature1-Aug-04 20:35 
AnswerRe: How to clear the screen in DOS Pin
V.1-Aug-04 20:38
professionalV.1-Aug-04 20:38 
AnswerRe: How to clear the screen in DOS Pin
ThatsAlok1-Aug-04 22:21
ThatsAlok1-Aug-04 22:21 
AnswerRe: How to clear the screen in DOS Pin
avenger_sb252-Aug-04 0:02
avenger_sb252-Aug-04 0:02 
AnswerRe: How to clear the screen in DOS Pin
Archer2822-Aug-04 4:43
Archer2822-Aug-04 4:43 
GeneralMS-ACCESS......few problems!!! Pin
Anonymous1-Aug-04 20:29
Anonymous1-Aug-04 20:29 
GeneralRe: MS-ACCESS......few problems!!! Pin
Michael P Butler1-Aug-04 22:49
Michael P Butler1-Aug-04 22:49 
Generalproblem getting size of file Pin
Archer2821-Aug-04 20:12
Archer2821-Aug-04 20:12 
i seem to be having a problem using GetFileSize in MFC
when i get the file size of anything other than an .exe it returns 0

code sample
hFile = ::CreateFile( m_FileToSplit, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
if( hFile != INVALID_HANDLE_VALUE )
{
dwFileSize = ::GetFileSize( hFile, NULL );
//doesnt seem to work
//m_FileSize.Format( "File Size: %d KB", dwFileSize );

/**/
if( dwFileSize >= 0x100000 )
{
m_FileSize.Format( "%d%s", (dwFileSize/0x100000), " MB" );
}
else if( dwFileSize >= 0x40000000 )
{
m_FileSize.Format( "%d%s", (dwFileSize/0x40000000), " GB" );
}
else
{
m_FileSize.Format( "%d%s", (dwFileSize/0x100000), " KB" );
}
/**/

CloseHandle( hFile );
}

as you may have noticed my other problem
m_FileSize.Format( "File Size: %d KB", (dwFileSize /0x100000) );
doesnt work while
m_FileSize.Format( "%d%s", (dwFileSize/0x100000), " KB" );

does anyone know why?

extra prob: m_OutputDir.Format( "%s\\%s\\Output", FileDrive, FilePath );

puts double slashes in the edit box, when i do
m_OutputDir.Format( "%s\%s\Output", FileDrive, FilePath );
it only puts single slashes, and i get a warning that \% and \O are not valid escape sequences
GeneralRe: problem getting size of file Pin
David Crow2-Aug-04 3:57
David Crow2-Aug-04 3:57 
Generalatof question Pin
User 5838521-Aug-04 20:09
User 5838521-Aug-04 20:09 
GeneralRe: atof question Pin
Archer2821-Aug-04 20:35
Archer2821-Aug-04 20:35 
GeneralRe: atof question Pin
Rick York1-Aug-04 21:06
mveRick York1-Aug-04 21:06 
GeneralRe: atof question Pin
User 5838522-Aug-04 1:05
User 5838522-Aug-04 1:05 
GeneralRe: atof question Pin
ssiegel2-Aug-04 17:52
ssiegel2-Aug-04 17:52 
GeneralClashes of numbers in Resource.h files Pin
PrashantJ1-Aug-04 19:51
PrashantJ1-Aug-04 19:51 
GeneralRe: Clashes of numbers in Resource.h files Pin
Jaime Stuardo2-Aug-04 4:46
Jaime Stuardo2-Aug-04 4:46 
GeneralRe: Clashes of numbers in Resource.h files Pin
PrashantJ2-Aug-04 18:31
PrashantJ2-Aug-04 18:31 
GeneralRe: Clashes of numbers in Resource.h files Pin
Jaime Stuardo3-Aug-04 1:27
Jaime Stuardo3-Aug-04 1:27 
GeneralHelp with Compiling Error Pin
arunforce1-Aug-04 18:43
arunforce1-Aug-04 18:43 
GeneralRe: Help with Compiling Error Pin
Michael Dunn1-Aug-04 19:23
sitebuilderMichael Dunn1-Aug-04 19:23 
GeneralSQL Commands Pin
Zero_One_ADO1-Aug-04 17:43
Zero_One_ADO1-Aug-04 17:43 
GeneralRe: SQL Commands Pin
Anonymous1-Aug-04 19:52
Anonymous1-Aug-04 19:52 
Generalfiles and folders Pin
Tyrus1821-Aug-04 17:02
Tyrus1821-Aug-04 17:02 
GeneralRe: files and folders Pin
Ravi Bhavnani1-Aug-04 17:37
professionalRavi Bhavnani1-Aug-04 17:37 
Generaloy ! Pin
bikram singh1-Aug-04 18:11
bikram singh1-Aug-04 18:11 

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.