|
Personally, I did not vote you down. Since you have no idea that I did or not, I have to guess that the mentioning my NUL vs. NULL point is but a coincidence - otherwise it would be a highly inappropriate assumption on your part. Also, you will note that even if I did vote you down, there are 4 other votes there as well. Did it ever occur to you that perhaps others know something that you do not? (And that just because you do not know what someone else is talking about, that does not mean that they do not?)
For the record, I voted your two earlier posts a 4. The fact that the first is now below that value may be indicative of something else.
NUL is one thing, NULL (in uppercase) is another. They are not two ways to spell the same thing, even though they have the same value. NUL is the name/mnemonic for an ASCII encoded character with a value of zero. BS , ACK , and NAK are similar characters. I am sure you (should?) know the history of NULL , even in C .
Consider this - my calling "C++" something else, like "G--; that C-ish language with the objects, and references, and virtual thingys" is not correct, even if I know that I am really talking about.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
|
Yep - lots of people also do not come to a complete stop at a stop sign, and still manage to get someplace in one piece. And you should know by now that you should never use or site Microsoft as a model for anything software-related! :P :P :P
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I wasn't referring to you personally. I actually hadn't even read your response yet when I posted that.
On similar topics in the past (not necessarily on this forum, but others), I've been flamed for the nul vs null argument. My point is that as long as the reader understands what you are saying, it doesn't matter how you spell it.
And yes, I'm well aware of the history of ASCII characters ... use to have to use them all the time in my last job (ACK/NAK especially).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Personally i found the answer of Zac very accurate and helpful
|
|
|
|
|
It was mostly accurate, Nish... :P
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I’ve been working up the learning curve trying to link F77 functions and subroutines to C/C++ (Pentium, XP, VC++6). I got stuff to work using MinGW’s f77, gcc and g++ compilers in console mode. So now I’m trying to switch to a dialog GUI. I would like to use MFC.
When I got to compiling the .rc file (using windres in MinGW), I started to run into problems. I see that MinGW supports WIN32 API but my suspicion is that it does not work with MFC. Not much on the subject on the net that I was able to find so I would appreciate any perils you(‘ll) can give up.
Just a beginner so please reply in a Newbie dialect of English if you don’t mind.
Thanks,
Mike
|
|
|
|
|
Do you have Visual Studio (or just Visual C++) installed? My guess is that you probably don't have the MFC headers and libraries (assuming you don't have them installed).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I have Visual Studio 6 SP6 installed and use the VC++6 IDE. I have made MFC apps that run using the VC++ compiler. It is when I try to compile a source (or resource)created using MFC with MinGW compilers that I get into trouble.
I have just come across some snippets that indicate that I will not be able to compile MFC source with MinGW compilers since, for one thing, MFC is copyrighted. I'll try again with a Win32 Application project. If that fails, I'll look into some other IDE supporting Win32 API.
OK?
|
|
|
|
|
|
It isn't so much that it is copyrighted as it is that the source code isn't completely available and you are trying to complile on a different compiler. If you are already using VC, I'm not sure why you would want to go to MinGW ...
In any case, all MFC really is, is a set of thin wrappers around Win32 API's and objects. That is, if you know what parts of MFC you would be using, you could fairly easily make your own wrapper classes that do the same thing.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
From some of the MinGW sites:
“
The MinGW basic runtime system, which is basically the glue to the underlying operating system, is completely in the public domain. The runtime system includes MinGW headers (such as stdio.h), libraries (such as libmingw32.a) and import libraries for CRTDLL/MSVCRT.
W32API, which consists of the headers and import libraries related to WIN32 API access, is released under copyright . The copyright agreement states no restrictions are placed on programs or object files compiled with the library.
Mingw provides access to the Win32 API. Theoretically, if you own the MFC source code you could build MFC libraries for Mingw. No one's tried this so far. If anyone does successfully accomplish it, please say so and it will be added to this document…
“
MinGW is the common denominator to link Fortran to C/C++. From what I’ve seen, Cygwin can be used on windows machines as well.
For example:
g77 -c test.f 2
g++ -o test test.cpp test.o
g77 will compile and assemble the Fortran source file test.f into the object file test.o
g++ will compile and assemble the C++ source test.cpp and link it to the Fortran object file test.o and create the test.exe executable. I haven’t come across how this can be done with VC++. To the contrary, not being able to do this sort of thing is one of the driving forces behind multi language compiler utilities such as MinGW.
|
|
|
|
|
I have an MMC snap-in project which compiles in VS2003. After converting to VS2005, I get a linker error:
uafxcwd.lib(afxinl2.obj) : error LNK2005: "public: __thiscall AFX_MAINTAIN_STATE2::~AFX_MAINTAIN_STATE2(void)" (??1AFX_MAINTAIN_STATE2@@QAE@XZ) already defined in mmc.lib(apimfc.obj).
It happens with Unicode and non-Unicode builds.
It happens only in debug builds.
Any ideas?
|
|
|
|
|
I think you should first compare the linker’s settings for Debug and Release modes, esp. the Additional Dependencies value in Linker --> Input page.
Then check if the the C/C++ --> Code Generation --> Runtime Library values are appropriate.
|
|
|
|
|
How do i get the creation date of a file?
So before i read a file, how can obtain the creation date of that file?
|
|
|
|
|
CFile myfile();<br />
myfile.GetStatus()<br />
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In case of Windows API, use GetFileTime .
In case of MFC, use CFile::GetStatus .
In case of run-time C++ libraries, use fstat , perhaps combined with fileno .
|
|
|
|
|
and see here
<br />
WIN32_FIND_DATA lp;<br />
FILETIME Time;<br />
SYSTEMTIME stSystem;<br />
<br />
HANDLE handle=FindFirstFile(filename,&lp);<br />
FileTimeToLocalFileTime(&lp.ftCreationTime,&Time);<br />
FileTimeToSystemTime(&Time,&stSystem);<br />
<br />
stSystem.wDay, stSystem.wMonth, stSystem.wYear<br />
FindClose(handle);<br />
whitesky
|
|
|
|
|
Can i compare entire filetimes.. SO for example...
Can i check to see if stSystem > some other date? Make a comparison that is.
|
|
|
|
|
|
When refreshing an HTML page with <object..> which is a MFC based ActiveX:
Works fine. But on each Refresh of the page (or navigating away and back to the page) an ASSERT occurs in CWnd:Createex. When ignored, very strange behavior starts (missing window painting, mouse events not handled...)
Replicated with a newly created MFC ActiveX in VS 2005.
Replicated by compiling in VS 2005 the source of a MFC ActiveX that worked fine
Replicated if run from within VS (debug/release) or just using the IE.
Environment:
IE6, SP2.
XP SP2
Any ideas?
Dani
|
|
|
|
|
i have written a program wherein would like to open the selected file in its defalut application. i have been able gather the name of the file with the path but i am unable to find a way launch it in its default application.
please help
|
|
|
|
|
|
See ::ShellExecute(NULL, "open", "iexplore.exe", "0.htm", NULL, NULL, SW_SHOWNORMAL); maybe it is some helpful to you
whitesky
|
|
|
|
|