Changeset 390 for trunk/Lucide


Ignore:
Timestamp:
Apr 14, 2010, 6:06:32 PM (11 years ago)
Author:
dmik
Message:

Oops, fixed r388 regression (system menu accelerators didn't work in normal mode).

Location:
trunk/Lucide/gui
Files:
2 edited

Legend:

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

    r389 r390  
    190190                                       WS_VISIBLE, _hmod, 0, NULL );
    191191    WinSetWindowULong( hWndDocFrame, QWL_USER, (ULONG)this );
     192    oldFrameProc = WinSubclassWindow( hWndDocFrame, docFrameProc );
    192193
    193194    hWndDoc = WinCreateWindow( hWndDocFrame, "er.docview", NULL,
     
    26272628
    26282629
     2630// static, window procedure
     2631MRESULT EXPENTRY DocumentViewer::docFrameProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
     2632{
     2633    DocumentViewer *_this = (DocumentViewer *)WinQueryWindowULong( hwnd, QWL_USER );
     2634
     2635    switch ( msg )
     2636    {
     2637        case WM_SYSCOMMAND:
     2638            // Send WM_SYSCOMMAND messages to the main frame so that the main
     2639            // system menu works when the document frame (which doesn't actually
     2640            // have a system menu) is in focus
     2641            WinSendMsg( _this->hMainFrame, WM_SYSCOMMAND, mp1, mp2 );
     2642            return (MRESULT)FALSE;
     2643    }
     2644
     2645    return _this->oldFrameProc( hwnd, msg, mp1, mp2 );
     2646}
     2647
  • trunk/Lucide/gui/docViewer.h

    r388 r390  
    169169        long textFieldPage;
    170170        long textFieldIndex;
     171        PFNWP oldFrameProc;
    171172        HWND hWndHscroll;
    172173        HWND hWndVscroll;
Note: See TracChangeset for help on using the changeset viewer.