本帖最后由 VisualEleven 于 2014-01-13 11:08:50 编辑

解决方案 »

  1.   

    中断停在wincore.cpp第932行:
    if(pMap)
    {
    ASSERT( (p = pMap->LookupPermanent(m_hWnd)) != NULL ||
    (p = pMap->LookupTemporary(m_hWnd)) != NULL);
    }
    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.
    }
    网上找了下资料说是在一个线程中调用另一个线程的MFC对象时会出现上述情况,但我这里没有调用线程,直接发的消息,然后propertysheet.domodel