|
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
|
|
|
|
|
It's a suggestion to provide you one more option about what you can do .Take the contents of a file (if the size is small )and put it in a buffer. Create some space by shifting the buffer with the length of your string. Copy your string to the emptied space and then save it to the file
Otherwise you will have to proceed the way Cedric suggested
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I need some help with debugging in VS8. I've got a vector of pointers, and at some point during runtime my vector goes null (which I need it not to do). I'd like to be able to break in the code as soon as that vector variable changes so I can figure out where it's being cleared. Is there a way to tell the compiler to break when a variable's value has changed? I cannot fully trace the call stack because the code is being called through COM (this is from a C# GUI to unmanaged C++ code). Any help would be appreciated. Thanks.
|
|
|
|
|
Look up 'data breakpoints' in the help.
Data breakpoints allow you to break execution when the value stored at a specified memory location changes.
You can set data breakpoints in break mode only.
Addresses of variables change from one debugging session to the next. For this reason, data breakpoints are automatically disabled at the end of each debugging session. If you attach a data breakpoint to a local variable, the data breakpoint remains enabled when the function ends. The memory address it is attached to no longer has the same meaning, however, so the results of such a breakpoint are unpredictable. If you set a data breakpoint on a local variable, it is best to remove or disable it before the function ends.
Visual Studio currently supports setting four data breakpoints per project.
How to Set a Memory Change Breakpoint
1. From the Debug Menu, choose New Breakpoint and click New Data Breakpoint
—or—
in the Breakpoints window Menu, click the New dropdown and choose New Data Breakpoint.
The New Breakpoint dialog box appears.
2.In the Address box, enter a memory address or expression that evaluates to a memory address. For example, &foo to break when the contents of variable foo change.
3.In the Byte Count box, enter the number of bytes you want the debugger to watch. For example, if you enter 4, the debugger will watch the four bytes starting at &foo and break if any of those bytes change value.
4.Click OK.
--
The Obliterator
|
|
|
|