Show
Ignore:
Timestamp:
01/26/09 17:17:31 (20 months ago)
Author:
svnusers
Message:

Safe cross-thread CWnd usage.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/users/kenneth_porter/FromTrunk/Win32/Sources/Support/Toolbars/CToolbar.cp

    r143 r186  
    679679         
    680680        // Only if commander available 
    681         if (GetCommander()) 
    682                 cmdui.DoUpdate(GetCommander(), true); 
     681        CWnd* commander = GetCommander(); 
     682        if (commander) 
     683                // we recreate the CWnd as we got it from another thread 
     684                cmdui.DoUpdate(CWnd::FromHandle(commander->GetSafeHwnd()), true); 
    683685         
    684686        // Check for visibility change tied to enable state