hi i am having stl model of a diamond which is meshed. i have to write a code to display the dimensions of its elemnts. im new to this stl files. is there any materials or links that guide me. pls help me
I'm trying to emulate Folder Tree View like one in Windows Explorer and I'm using IShellFolder interface and EnumObjects() function to enumerate shell folders. I'm storing
pointer to ITEMIDLIST for each tree node so that it can be used later for showing context
Now, whenever I browse a removable drive (USB drive) through it, i'm unable to unmount it.
Is this possible because some of the ITEMIDLIST structures aren't freed up? Does that keeps
the drive locked?
I want to send a message to WindowProc() function of application from a static callback function.
The PostMessage() and SendMessage() functions makes "Unhandled Exception". Can anybody tell me how to make the PostMessage() call no error.
If I use global namespace Postmessage, there is no error.
The runtime error message is as follows:
"Unhandled exception at 0x7c28e12a (mfc71d.dll) in MIDIApplication.exe: 0xC0000005: Access violation reading location 0x00000020."
The code causing the error is: AfxGetMainWnd()->SendMessage(wMsg, 0, dwParam1); where wMsg is the message and dwParam1 is the LParam in argument list of static callback function: MidiInProc().
Thanks for your help!!
Hi, pWnd is not NULL. The value is 0x0012ea24.
Is it possible to use DispatchMessage() to send message to WindowProc().
What is difference between DispatchMessage and PostMessage()?
I am happy that your issue has been resolved. But, so you can learn from this experience with others... let me explain my theory about what was happening.
You stated that you were calling AfxGetMainWnd() from within a callback function. Callbacks are often not excuting within the same thread as the main window. They may be called from an external thread.
"If AfxGetMainWnd is called from the application's primary thread, it returns the application's main window according to the above rules. If the function is called from a secondary thread in the application, the function returns the main window associated with the thread that made the call."
What kind of exception? From where is it being thrown? What does the code look like around the "throw" site? What are the parameters you're passing to the API? Is the HWND valid? In short we need some more detailed information.