Click here to Skip to main content
16,006,605 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ becoming obsolete? Pin
Ryan Binns14-Jul-03 5:02
Ryan Binns14-Jul-03 5:02 
AnswerRe: VC++ becoming obsolete? Pin
567890123413-Jul-03 23:21
567890123413-Jul-03 23:21 
GeneralRe: VC++ becoming obsolete? Pin
Ryan Binns13-Jul-03 23:33
Ryan Binns13-Jul-03 23:33 
GeneralRe: VC++ becoming obsolete? Pin
jhwurmbach14-Jul-03 0:00
jhwurmbach14-Jul-03 0:00 
GeneralThreading and MFC Pin
Jeremy Pullicino13-Jul-03 22:39
Jeremy Pullicino13-Jul-03 22:39 
GeneralRe: Threading and MFC Pin
Ryan Binns13-Jul-03 22:49
Ryan Binns13-Jul-03 22:49 
GeneralRe: Threading and MFC Pin
Jeremy Pullicino14-Jul-03 0:40
Jeremy Pullicino14-Jul-03 0:40 
GeneralRe: Threading and MFC Pin
Ryan Binns14-Jul-03 0:45
Ryan Binns14-Jul-03 0:45 
Jeremy Pullicino wrote:
why can't I use MFC to update my dialog from the second thread?

MFC uses thread-specific data internally. Using MFC objects created in one thread in another thread uses inconsistent internal data, and can cause catastrophic errors, hence MFC incorporates checks to prevent this.

Just for a test, create a window in one thread and do this in another thread:
ASSERT(CWnd::FromHandlePermanent(pWnd->m_hWnd) == pWnd)
In a single-threaded application, this will work perfectly as expected, but if pWnd was created in a different thread, FromHandlePermanent() will return NULL because the window map is thread-specific data, and the ASSERT will be triggered.

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: Threading and MFC Pin
Alexandru Savescu14-Jul-03 1:06
Alexandru Savescu14-Jul-03 1:06 
GeneralText Highlighting in CRichEditView Pin
Anonymous13-Jul-03 22:10
Anonymous13-Jul-03 22:10 
GeneralList controls with check boxes Pin
YaronNir13-Jul-03 21:56
YaronNir13-Jul-03 21:56 
GeneralRe: List controls with check boxes Pin
Ryan Binns13-Jul-03 23:06
Ryan Binns13-Jul-03 23:06 
GeneralRe: List controls with check boxes Pin
YaronNir13-Jul-03 23:12
YaronNir13-Jul-03 23:12 
GeneralRe: List controls with check boxes Pin
Ryan Binns13-Jul-03 23:21
Ryan Binns13-Jul-03 23:21 
GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:07
YaronNir14-Jul-03 1:07 
GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:07
YaronNir14-Jul-03 1:07 
GeneralRe: List controls with check boxes Pin
Ryan Binns14-Jul-03 1:38
Ryan Binns14-Jul-03 1:38 
GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:46
YaronNir14-Jul-03 1:46 
GeneralRe: List controls with check boxes Pin
Ryan Binns14-Jul-03 1:49
Ryan Binns14-Jul-03 1:49 
Question??? Pin
DaveE9th13-Jul-03 21:08
DaveE9th13-Jul-03 21:08 
AnswerRe: ??? Pin
Cedric Moonen13-Jul-03 21:51
Cedric Moonen13-Jul-03 21:51 
AnswerRe: ??? Pin
jhwurmbach13-Jul-03 22:02
jhwurmbach13-Jul-03 22:02 
GeneralRe: ??? Pin
DaveE9th13-Jul-03 22:25
DaveE9th13-Jul-03 22:25 
AnswerRe: ??? Pin
Miszou14-Jul-03 9:58
Miszou14-Jul-03 9:58 
GeneralRe: ??? Pin
Anthony_Yio15-Jul-03 1:07
Anthony_Yio15-Jul-03 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.