Changeset 67 for trunk


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)

Location:
trunk/Lucide/SOURCE/gui
Files:
3 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
  • trunk/Lucide/SOURCE/gui/docViewer.h

    r61 r67  
    117117
    118118        static MRESULT EXPENTRY docViewProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
     119        static MRESULT EXPENTRY docFrameProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
    119120        static void searchthread( void *p );
    120121        static void searchabort( void *p );
     
    128129        HWND hWndDocFrame;
    129130        HWND hWndDoc;
     131        PFNWP oldFrameProc;
    130132        HWND hWndHscroll;
    131133        HWND hWndVscroll;
  • trunk/Lucide/SOURCE/gui/makefile

    r61 r67  
    11.autodepend
    22
    3 TEST=1
     3TEST=0
    44VERSION=Beta 1.2
    55
Note: See TracChangeset for help on using the changeset viewer.