Ignore:
Timestamp:
Jul 1, 2006, 7:02:13 PM (15 years ago)
Author:
Eugene Romanenko
Message:

fixed processing of syscommands when document area active (closes #41)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/gui/docViewer.cpp

    r65 r67  
    129129    hWndDocFrame = WinCreateStdWindow( hWndFrame, WS_VISIBLE, &dfFlags, NULL, NULL,
    130130                                       WS_VISIBLE, NULLHANDLE, 0, NULL );
     131    WinSetWindowULong( hWndDocFrame, QWL_USER, (ULONG)this );
     132    oldFrameProc = WinSubclassWindow( hWndDocFrame, docFrameProc );
    131133
    132134    hWndDoc = WinCreateWindow( hWndDocFrame, "er.docview", NULL,
     
    16951697}
    16961698
    1697 static int zzz = 0;
     1699
    16981700// static, window procedure
    16991701MRESULT EXPENTRY DocumentViewer::docViewProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
     
    17801782}
    17811783
     1784
     1785// static, window procedure
     1786MRESULT EXPENTRY DocumentViewer::docFrameProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
     1787{
     1788    DocumentViewer *_this = (DocumentViewer *)WinQueryWindowULong( hwnd, QWL_USER );
     1789
     1790    switch ( msg )
     1791    {
     1792        case WM_SYSCOMMAND:
     1793            // Send WM_SYSCOMMAND messages to main frame
     1794            WinSendMsg( _this->hMainFrame, WM_SYSCOMMAND, mp1, mp2 );
     1795            return (MRESULT)FALSE;
     1796    }
     1797
     1798    return _this->oldFrameProc( hwnd, msg, mp1, mp2 );
     1799}
     1800
Note: See TracChangeset for help on using the changeset viewer.