In C++ deleting a NULL pointer is a NOP - It is fine to do so.
You comment about a double delete is correct but only works if you NULL it after deleting it:
CSomeObject* pObj = SomeFunction();<br />
// Later...<br />
delete pObj;<br />
pObj = NULL; // NULL it so we can't accidently delete it again!<br />// Later...<br />
delete pObj; // This is a NOP, no need for an if.
I am using NI graph in some application .I need to get the height and width of the plot area of the graph like not the controls height and width its on the control some area will be used to plot the graph .I used the line below but its returning zero is there any alternative mathod
long lHeight = GraphPtr->GetPlotAreaImage().GetHeight();
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
I am lnking a static library in my application. On linking i am getting the following errors. I compiled my application with /MDd and /MD switches.
This is errors text that i am getting on building my application.
I am able to successfuly build my application when i link with my static library (which is built in debug option). But unfortunately i am not able to successfully execute my application when i link with static library(which is built in release mode). When i am debugging it is giving the following error
user breakpoint called from code 0x77f9193c.
Any help in this regard
It is my first posting on code project . I came to know about this forum through my friend.
My probles is that I developed a application GsrApp using VC++ .NET 2003. This application runs fine on Windows 2000 , Windows 2003 & Window Xp home or professional . But yesterday I tried to run the same application on Windows 98 and Windows ME . But when I tried to run it got error :
GsrApp.exe caused invalid page fault in module user.exe
I coould not get through this problem because I cannot install VC++ .NET 2003 on Windows 98 or Windows ME as it could only be installed on Windows X, Windows 2000 & Windows 2003 . Hence couldnt formulate any way to debug my application on Windows 98 or ME . Please some Guru help me to get out of this problem . And tell me why I am failing on Windows 98 or ME
Thanks for replying George , My application uses MBCS . What do you think should I use unicode for Windows 98 . And just for your information that I am also using adobe 5.0 libraries in my application.
I am using a CListCtrl created in a dialog window. This CListCtrl displays thumbnail images.
I want a notification when a user double clicks an image in list. The OnLButtonDblClk function only works when user double clicks in the dialog window. It does not catch the event when a user double clicks in the list control window, probably because the dialog treats list control as a separate window.
Can anyone please let me know how do I write a event handler to to catch the event when an image in CListCtrl is double clicked.
Thanks in advance for your reply.
Last Visit: 31-Dec-99 18:00 Last Update: 24-May-22 10:48