Changeset 326

Show
Ignore:
Timestamp:
03/14/10 19:59:00 (5 months ago)
Author:
svnusers
Message:

kp: Reapply fixes from r186 (using CWnd from thread other than the one that created it).

Location:
Mulberry/branches/users/kenneth_porter/From-shared-v4.1d1/Win32/Sources
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/users/kenneth_porter/From-shared-v4.1d1/Win32/Sources/Application/Server/Browse_Dialog/CServerBrowseTable.cp

    r143 r326  
    6969 
    7070        // Allow multiple selections 
    71         ModifyStyle(0, LVS_SINGLESEL); 
     71        if (m_hWnd) 
     72                ModifyStyle(0, LVS_SINGLESEL); 
    7273} 
    7374 
  • Mulberry/branches/users/kenneth_porter/From-shared-v4.1d1/Win32/Sources/Application/Status/CStatusWindow.cp

    r143 r326  
    5757BOOL CUTF8StatusBar::SetPaneTextUTF8(int nIndex, const char* utf8, BOOL bUpdate) 
    5858{ 
     59        // Don't call into CWnd code if this thread doesn't own this CWnd 
     60        if (!FromHandlePermanent(GetSafeHwnd())) 
     61                return FALSE; 
    5962#ifdef _UNICODE 
    6063        cdustring utf16(utf8); 
     
    105108} 
    106109 
     110BOOL CUTF8StatusBar::RedrawWindow(LPCRECT lpRectUpdate, 
     111                                  CRgn* prgnUpdate, 
     112                                  UINT flags) 
     113{ 
     114        // Don't call into CWnd code if this thread doesn't own this CWnd 
     115        return FromHandlePermanent(GetSafeHwnd()) ? CStatusBar::RedrawWindow(lpRectUpdate, prgnUpdate, flags) : FALSE; 
     116} 
     117 
    107118// Init status 
    108119void CStatusWindow::InitStatusBar(CUTF8StatusBar* statusBar) 
  • Mulberry/branches/users/kenneth_porter/From-shared-v4.1d1/Win32/Sources/Application/Status/CStatusWindow.h

    r143 r326  
    3030         
    3131        BOOL SetPaneTextUTF8(int nIndex, const char* utf8, BOOL bUpdate = TRUE); 
     32 
     33        BOOL RedrawWindow( 
     34                          LPCRECT lpRectUpdate = NULL, 
     35                          CRgn* prgnUpdate = NULL, 
     36                          UINT flags = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE  
     37                         ); 
    3238}; 
    3339 
  • Mulberry/branches/users/kenneth_porter/From-shared-v4.1d1/Win32/Sources/Support/Toolbars/CToolbar.cp

    r316 r326  
    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