ASSERT((CWnd*)p == this); // must be us // Note: if either of the above asserts fire and you are
// writing a multithreaded application, it is likely that
// you have passed a C++ object from one thread to another
// and have used that object in a way that was not intended.
// (only simple inline wrapper functions should be used)
//
// In general, CWnd objects should be passed by HWND from
// one thread to another. The receiving thread can wrap
// the HWND with a CWnd object by using CWnd::FromHandle.
//
// It is dangerous to pass C++ objects from one thread to
// another, unless the objects are designed to be used in
// such a manner.
执行到这里面出错我想在exe中通过调用dll的函数来调用dll中的对话框
在exe中我在菜单中调用dll函数 就会出现上面的错误
但是 我如果直接鼠标单击view来调用dll函数 就一切ok
这是为什么?
不知道我有没有表达清楚?
// writing a multithreaded application, it is likely that
// you have passed a C++ object from one thread to another
// and have used that object in a way that was not intended.
// (only simple inline wrapper functions should be used)
//
// In general, CWnd objects should be passed by HWND from
// one thread to another. The receiving thread can wrap
// the HWND with a CWnd object by using CWnd::FromHandle.
//
// It is dangerous to pass C++ objects from one thread to
// another, unless the objects are designed to be used in
// such a manner.
执行到这里面出错我想在exe中通过调用dll的函数来调用dll中的对话框
在exe中我在菜单中调用dll函数 就会出现上面的错误
但是 我如果直接鼠标单击view来调用dll函数 就一切ok
这是为什么?
不知道我有没有表达清楚?
菜单中响应的消息在什么地方实现CMainFrame还是VIew,单击呢?
Program:G:\SHISHI\SHISHI\Debug\SHISHI.exe
File:wincore.cpp
Line:884
For information on how your program can cause an assertion
failure,see the Visual C++ documentation on asserts.菜单响应不论是CMainFrame还是View 都不行
单击view 可以
并且我把dll中函数调用对话框改成返回一个数值,
那全部都可以了