"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
i have a c library which sends and receives video from other peer, so i have to display video..i have created window for viewing video using mfc...what would be ur suggestion how to send/receive the video data from c library to my mfc application... does sendMsg can handle that huge data (around 3k-4k bytes per message)or should i go for any shared memory kindof stuff....
i have even tried of drawing my video on win32 app but it looked some what weird.....
Although your instincts may tell you otherwise, this is not how memory management[^] works. Your application has an internel working set[^] of memory. The operating system uses this extra memory to make your application faster since the memory is already allocated but simply marked as "stand-by". When you free your memory it does not mean your working set will decrease in size. The memory is simply marked as "not needed now, but maybe later" or "standby". I hope this makes sense.
It is possible to force all standby memory to be released by calling the SetProcessWorkingSetSize Function[^] with -1 for both arguments although its not recommended. It required the PROCESS_SET_QUOTA access right. You can severly harm application performance by abusing SetProcessWorkingSetSize. Note that this technique is not recommended for most applications.
I need help for coloring the CTabCtrl Window to white in MFC.
Actually I have a Tab control having Two tabs,I have not added Property pages, just put some controls like Edit box and Radio buttons on Tab control and on click of Each tab I am just hiding and showing some controls.
I want to make Tab control color white..
Please give me some sample code or some link for help..
It wouldn't work for any class, whether virtual or not.
There's not an implicit assignment operator for a type that takes a
base type as its right-hand operand. You must explicitly provide the
assignment operator or cast the left operand to a type that matches
an existing assignment operator overload.
Using a cast may hide the compiler error but if the operator overload that
the compiler chooses to call doesn't actually return a derived&, then you can't
rely on it being a derived object.
I'm trying to hook in a master "omg, we're going down, eject, eject, eject!" code chunk into my mfc dialog application. Basically, I do not want the user to see "chg.exe has done something bad and will need to terminate." What I want is to be able to capture as much forensic data to allow me to have a hope to diagnose what caused the crash.
So, in doing my research, I have seen two main approaches - override the run method of the CWinApp:
AfxMessageBox(_T("Exeption!!!")); // or trace or printf, does not matter.
I've also added the ProcessWndProcException handler at the app level as well.
What I have seen so far is that basically the code is ignored. If I hack up a little dialog app and divide by 0 or try to modify NULL, I see nothing at run time until I try to exit my app. What should one expect from these approaches?
Will program for food... Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin
Is there a way to catch Exceptions in my SDI MFC application in a very low level?
What I mean: I work with an SQL database and it may be that I have an error in the SQL syntax etc. In this case a specific exceptions is thrown.
I do not want to catch it somewhere in my code for View/Document but rather somewhere in the application object and then just display an error message and terminating my application the right way (including calling of all destructors).
When I do not catch them, I get a "Runtime error" in the debug version. I would like to have this similar behaviour.
You can add a global exception handler using the SetUnhandledExceptionFilter Function[^] and catch all SQL related errors and return EXCEPTION_EXECUTE_HANDLER for all other exceptions or maybe handle them as well.
I am trying to serialize all objects stored in a CArray but if a trace it through, it is calling the default SerializeElements which understandably does not serialize the objects correctly. I want this to call mt object's Serialize method.
I have tried adding my own helper but the compiler says that it already exists. This may be because I have used DECLARE_SERIAL and IMPLEMENT_SERIAL macros. MSDN says that if you use these macros, the helper function will be implemented, but if that is so, why isnt it being called?
I have some code which has a dialog box and a list control placed on it, and I handled the WM_LBUTTONDOWN message on it, which perfectly executed when the code was compiled in Visual C++ 6.0. But the same code, when ported to VS 2005, does not respond to this message at all, although the code compiles and links fine in VS 2005. I tried to handle the notification message, NM_CLICK also, on the List Control which is on the dialog box, but to no avail. What must be the problem?
I am handling WM_LBUTTONDOWN message in a CListCtrl-derived class, but not getting why it's not working. When this project was in Visual C++ 6.0, it was running fine, but now that I have converted this to Visual C++ 2005, it is failing to run, although it compiles fine, and creates the DLL.