|
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
|
|
|
|
|
|
toxcct wrote: suss:
diff is just 2 min... thats considerable
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i dont like that you i like you
whitesky
|
|
|
|
|
not what i was expressing (don't worry, i like you too )
i actually meant that you call shellExecute to start iexplore.exe manually and passes it the html file to be opened.
it's not how things should be done.
firstly, if you open IE, you will always get IE opened, even if it's not the default browser (which is not what the OP was looking for).
secondly, in a general mean, don't directly open the exe associated. only "open" the file, and ShellExecute() finds itself the default program associated to launch such a file...
see what i mean now ?!
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
thank you for information
now toxcct wrote: see what i mean now ?!
very good one one
and i hope that i see VisualCalc(4.0)
|
|
|
|
|
|
I use fopen(fp, "r+") to update the file
I find the key which I want to update (with fgets())
now i print with fprintf("%s\n"),
It just override the old text,
but not open new line.
RutR
|
|
|
|
|
You can't. The only way to do it is open a temporary file, copy up to the line you wish to add, copy the new line, then copy the rest of the file. Then, delete the original file and rename the new one with the original name.
Cédric Moonen
Software developer
Charting control
|
|
|
|