Re: проблемы с UpdateData()
От: Admiral Украина  
Дата: 13.08.02 15:05
Оценка:
Здравствуйте Corvin, Вы писали:

C>Вызываю в нити pWhatever->UpdateData(false), — выбрасывает с ошибкой доступа к памяти...

C>pWhatever — указатель на мой диалог, в котором была создана нить. Кто сталкивался, — допоможите, плз...

Из комментариев в MFC следует, что передавать между потоками классы MFC (как в твоем случае) нельзя:

    // 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.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.