|
Have you called the document's SetModifiedFlag() method?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i have now the following Code :
When i click on the close or exit button, OnDeleteContents() will be called:
void CTest_Doc::OnDeleteContents()
{
CDocument::DeleteContents ();
CDocument::OnCloseDocument();
CDocument::SetModifiedFlag(1);
}
after that there is a heap problem???
|
|
|
|
|
okay i corrected :
void CTest_Doc::OnDeleteContents()
{
CDocument::SetModifiedFlag(1);
CDocument::DeleteContents ();
CDocument::OnCloseDocument();
}
but the Prompt save message stiil not appear??
|
|
|
|
|
susanne1 wrote:
but the Prompt save message stiil not appear??
Because you are possibly calling SetModifiedFlag() too late. It needs to be called as soon as the document changes.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I am facing issue while implementing restart manager in VS 2005 MFC project. it is saying restartmanager.h is not found. I am implementing this for W2k8 and Vista OS. I am not getting information about Which VS support this. I found VS 2005 C# is supporting this.
Would it be possible to implement restart manager in VS 2005 MFC project?
|
|
|
|
|
|
Hi,
I'm facing some problem when trying to build my solution in Release mode(building in debug mode works fine).
My solution contains several project(10 of them are static libraries and one is the executable which uses those libraries).
One of the static libraries is the GUI implementation(MFC).
I've configured the properties of each project in release mode(e.g. use MFC as a shared DLL , use runtime library as Multi-Threaded DLL[\Md] etc.).
I've managed to compile the entire solution,but failed to link the executable.
I'm getting the following error
<br />
Linking...<br />
GsaActLib.lib(g_act_hndlact.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification<br />
mfcs80.lib(nolib.obj) : warning LNK4098: defaultlib 'nafxcw.lib' conflicts with use of other libs; use /NODEFAULTLIB:library<br />
HmiLib.lib(h_windsp_formMng.obj) : error LNK2019: unresolved external symbol __imp___invalid_parameter_noinfo referenced in function "public: bool __thiscall std::_Tree<class std::_Tmap_traits<class IlvGadgetContainer *,int,struct std::less<class IlvGadgetContainer *>,class std::allocator<struct std::pair<class IlvGadgetContainer * const,int> >,0> >::const_iterator::operator==(class std::_Tree<class std::_Tmap_traits<class IlvGadgetContainer *,int,struct std::less<class IlvGadgetContainer *>,class std::allocator<struct std::pair<class IlvGadgetContainer * const,int> >,0> >::const_iterator const &)const " (??8const_iterator@?$_Tree@V?$_Tmap_traits@PAVIlvGadgetContainer@@HU?$less@PAVIlvGadgetContainer@@@std@@V?$allocator@U?$pair@QAVIlvGadgetContainer@@H@std@@@3@$0A@@std@@@std@@QBE_NABV012@@Z)<br />
HmiLib.lib(h_utils_studio_attrGadget.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo<br />
HmiLib.lib(h_utils_studio_enumGadget.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo<br />
HmiLib.lib(h_utils_studio_egGadget.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo<br />
.\Release/link.exe : fatal error LNK1120: 1 unresolved externals<br />
<br />
Error executing link.exe (tool returned code: 1120)<br />
<br />
Newlink - 5 error(s), 68 warning(s)<br />
I've trying to google a little bit but didn't find an explanation for the above error.
Anyone?
With best regards,
Eli
|
|
|
|
|
eli15021979 wrote: GsaActLib.lib(g_act_hndlact.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
...
I've trying to google a little bit but didn't find an explanation for the above error.
Did you look here?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi David.
Thanks for your help,but this warning is not my problem...
I know that my problem is the errors below(LNK2001)...I just can't find the call for invalid_parameter_noinfo.
According to MSDN(relating LNK2001):
When compiling with /MD, a reference to "func" in your source becomes a reference "__imp__func" in the object since all the run-time is now held within a DLL. If you try to link with the static libraries LIBC.lib or LIBCMT.lib, you will get LNK2001 on __imp__func. If you try to link with MSVCxx.lib when compiling without /MD you will not always get LNK2001, but you will likely have other problems.
All the libraries in the solution,as well as the executable, are being compiled with /Md option(i.e runtime library is a multhi-threaded DLL).
In the linker option I specified the linker to ignore LIBC,LIBCMT and MSVCRT default libraries.
But still,I get those error...
Anything?
Thanks again,
Best regards,
Eli
|
|
|
|
|
Hi David,
I removed MSVCRT.lib from default libraries ignore list and it's working just fine.
Thanks again,
Eli
|
|
|
|
|
Your post was helpful for me too!!
Thank you!!!
|
|
|
|
|
|
This explains the fact.
error LNK2019: unresolved external symbol __imp___invalid_parameter_noinfo
This means program calls invalid_parameter_noinfo() but no symbols around libraries.
If you did not call this function directly, some libraries (guess MFC?) call it.
You can try goole with keyword by invalid_parameter_noinfo.
|
|
|
|
|
Hi norish.
Thanks for your help.
I know that this is my problem...I just can't find the call for invalid_parameter_noinfo.
According to MSDN:
When compiling with /MD, a reference to "func" in your source becomes a reference "__imp__func" in the object since all the run-time is now held within a DLL. If you try to link with the static libraries LIBC.lib or LIBCMT.lib, you will get LNK2001 on __imp__func. If you try to link with MSVCxx.lib when compiling without /MD you will not always get LNK2001, but you will likely have other problems.
All the libraries in the solution,as well as the executable, are being compiled with /Md option(i.e runtime library is a multhi-threaded DLL).
In the linker option I specified the linker to ignore LIBC,LIBCMT and MSVCRT default libraries.
But still,I get those errors...
Anything?
Thanks again,
Best regards,
Eli
|
|
|
|
|
Hi norish,
I removed MSVCRT.lib from default libraries ignore list and it's working just fine.
Thanks again,
Eli
|
|
|
|
|
Hello,
Please could somebody help me about the following :
I need a simple way to create a bitmap from scratch in memory, draw something in it using some GDI functions (like LineTo, Polyline or TextOut), and convert the result in a 2D byte array, for using in a home made raster device.
The result needs to have only 2 colors (black and white), although it can be useful to have intermediary grayscale in order to be able to stretch or shrink the bitmap and choose the transition level between black and white.
No file nor any resource nor any window should be involved, everything has to stay in memory. No compression is needed either.
Language is C/C++, *without* MFC.
I tried using CreateCompatibleDC, CreateCompatibleBitmap and GetDIBits, maybe this is still what I have to do, but now unfortunately I get only inconsistent results.
Is there somebody here who already made something like this ?
Best regards,
Gilles
|
|
|
|
|
|
Ok, thank you very much, this seems to give very interesting results.
Gilles
|
|
|
|
|
Hi Guys
I have a problem which has got me beat and would appreciate any help in either finding a solution or even a 'pointer' to a solution.
The problem is I tend to use a lot of MySQL for various jobs. Normally I would use either PERL or PHP to acces the database and both do a grand job. More recently dusting off my C++ skills I decided to approach the MySQL from a C++ angle. Now I can connect to a MySQL DAtabase, run a query and retreive the data from the query results. What I would like to do is to get Meta data about the fields from the query. Name, datatype that sort of thing. Now this is easy in PERL or PHP but I've tried several methods with c++ and to date no success. What I have found is poorly documented and without the correct parameters the whole thing goes nowhere
There is no specific reason for needing this and no urgency just I would like to see if it can be done. Any help will be warmly appreciated.
Thanks in advance
|
|
|
|
|
|
i'm using window forms application and i'm facing a problem with a variable date_time that hold
a long value 1243930978
I need to convert this number to datetime
Note : when i declare the variable as "CTime sss" it give error undeclared identifier "sss"
any one can help?
|
|
|
|
|
That's matter for the Managed C++/CLI forum [^]. Isn't that?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
wael_r wrote: a variable date_time that hold
a long value 1243930978
I need to convert this number to datetime
It would probably help you to know the units that 'date_time' represents - is 1243930978 the number of seconds from some epoch? Or what? Do you know?
Oh - and as I've suggested to you before - post to the correct forum, where they know about Managed C++/CLI
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|