|
Yes, I do check for the existance of the object,if it is there then i will delete it before doing new.
I run my program through Bouncechecker application, there is no memory or resource leaks.
Even i think problem is somewhere else. But always exception occurs at that stmt.
Code is too huge to post here.
What puzzel's me is it works fine for first 3 times,4th time it throws the exception.
|
|
|
|
|
Neha wrote:
Yes, I do check for the existance of the object,if it is there then i will delete it before doing new.
How are you checking for the existence of the object? Chances are
that this is causing the problem and you are trying to delete an object that does not exist.
John Theal
Physicist/Mathematical Programmer
Digital Immersion Software Corporation
Got CAD?
http://www.presenter3d.com[^]
http://www.merlin3d.com[^]
|
|
|
|
|
I have done like this:
if(m_str!=NULL)
{
delete [] m_str;
m_str=NULL;
}
|
|
|
|
|
Hrm - the only problem I could see with that is that if the object that m_str is pointing to has lost scope, then m_str would not be NULL and calling delete on m_str could cause the exception...
Just thought of something else...are you initializing m_str to NULL??
John Theal
Physicist/Mathematical Programmer
Digital Immersion Software Corporation
Got CAD?
http://www.presenter3d.com[^]
http://www.merlin3d.com[^]
|
|
|
|
|
Is it possible to detect incoming telephone calls using VC++......???
To elaborate: assume I want to establish connection with a remote device as soon as I get a call from a friend(modem is used at both ends), so is it possible to establish a connection between the two automatically..
Maverick
|
|
|
|
|
|
Michael.....thanks for your suggestion, but man I also know that I will find help in TAPI....the main problem is that I am new to thins VC field and as such don't have the exact idea or knowhow that I can make out what API's to use.....presently i am working with...the API's under "Tone Monitoring".... can you please tell me if I am right
regards
Maverick
|
|
|
|
|
What I'm doing is saving of captured image. I use digital usb pc camera to acquire images. My pc camera sends JPEG images to PC, I'm trying to capture one frame and save it to file. But I couldn't find how to save captured image without changing type of image((for example) bitmap->JPEG).
I want to confirm what kind of image comes from my pc camera, so I can't use "capFileSaveDIB"-operator. When I capture a frame, I use "capEditCopy"-operator.
Is it possible to saving contents in clipboard without transformation?
I need your advice...
I'm not good at English, so I'm afraid that you couldn't understand what I said....
1004
|
|
|
|
|
I wrote codes with visual C++ 6.0.
How I make setup file?
emroz
|
|
|
|
|
Your question is way too vague. Can you be a bit more specific?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
There is package and deployment in Visual Basic 6.0.
But I couldn't find it in visual C++ 6.0.
I heard there is a program to make setup file.
emroz
|
|
|
|
|
Search MSDN and the Internet for InstallShield. This is what Microsoft uses to install many of their applications.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I am developing OLE DB consumer and need to handle array parameters in stored procedures.
For simple data types we pass the Destination memory location to store the converted
value.
I am passing a SAFEARRAY for array parameter to the IDataConvert::DataConvert method and it returns without any error but the
ICommand::Execute method fails without giving any errors.
I am not sure whether the way I am passing the SAFEARRAY is correct.
If anyone of you faced similar problems and has got solution please help me.
Thanks,
Mahesh
|
|
|
|
|
hi,
does somebody know how to intercept the messages which were send if the right mouse button is pressed on a MFC Dialog in the Taskbar ? With Spy++ i have found the messages be send. There are to interceptions i need: WM_MENUSELECT and WM_LBUTTONDOWN. WM_LBUTTONDOWN namely is send (you can check it with Spy++) but i can't catch it with OnLButtonDown(). Why ??
Thanks in advance !
|
|
|
|
|
Hello !
If I remember correctly, a window that has it's title shown in the Taskbar (A Windows program) gets a message when a button is clicked over it's area, but the generated message is a non-client area related one.
Try checking the Platform SDK reference for information about WM_NC*** messages, namely, WM_NCLBUTTONDOWN. Not sure about this, though, so be certain.
Checking with Spy++ notes that WM_NCACTIVATE messages are sent when mouse buttons are clicked over the window's taskbar area.
Hope this helps,
Antti
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks for your help!
The non-client area is part of the displayed dialog, and if i click on the icon within the dialog, you're right, but the whole situation looks different at the Taskbar. If i press the right button on the dialog at the taskbar, WM_NCACTIVATE is send, unfortunately it's the only WM_NC** message!
Thank you anyway!
|
|
|
|
|
After doing a bit more of research work, I found a suitable article from MSDN to cater for your needs. Unlike I had remembered, the Taskbar is an object of the shell, and doesn't send any other messages to the windows residing in the tray area besides the WM_NCACTIVATE.
The MSDN link is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/taskbar.asp
(If you can't get the link open, do g00gle with "The Taskbar (Windows Explorer)" to get a link)
From there, you can click 'Managing Taskbar buttons'. From there, scroll a bit down for information about the COM object representing the Taskbar (Modifying contents of the Taskbar)
So, it is a COM object. Get it's interface and you can do pretty much whatever you want. Regarding the issue you described earlier, jack in to the Taskbar object and add there a feature to send a message to your windows/applications when the user fiddles with their buttons on the Taskbar. I am wondering why this type of extension hasn't been written already. Guess nobody required it yet.
Greets,
Antti
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks for your help, but adding and removing items from the taskbar isn't my problem, i need to know if an item of the taskbar is pressed or not! I haven't found any useful method which can do this. I'm thus far to implement it on my own whith threads who catches all messages be send!
Thanks anyway!
|
|
|
|
|
Even though I've searched the net and looked in MSDN I can't remember the name of the function that returns the ANSI keycode of a character. Does anyone knows?
|
|
|
|
|
Can you provide an example of what this function does (e.g., Given X, it returns Y)?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
Thanks a lot John, that was exactly what I was looking for, it appears that in C++ this function doesn't exist because the compiler already does the conversion. Thanks, again.
|
|
|
|
|
Hi,
I am designing a winsock applications that utilizes AcceptEx() winsock extension. According to MSDN, sockets that are accepted via AcceptEx() work only with send(), recv() and other functions. However, they do not work with WSASend() and WSARecv().
Is there a solution to AcceptEx() working with WSASend() and WSARecv()? I want to make sure there is no other alternative.
One reason I prefer to use the winsock 2 API is because of the OVERLAPPED I/O feature. Secondly, I the application runs under IOCP. I have never used send() and recv() with IOCP.
Thanks,
Kuphryn
|
|
|
|
|
In a dialog based application is there any way to catch stndard
output( say cout<< "something" )and display it in a control while program is running.
Warm Regards,
KKRam
|
|
|
|
|
Do you know the definition of "overloading"?
|
|
|
|