Ignore:
Timestamp:
Nov 6, 2006, 6:03:44 PM (14 years ago)
Author:
Eugene Romanenko
Message:

pipe commands

File:
1 edited

Legend:

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

    r138 r152  
    7575HWND createToolbar( HWND hwnd );
    7676void AboutBox( HWND hWndFrame );
     77void initPipeMon( HWND hWndFrame );
     78void unInitPipeMon();
    7779
    7880HAB   hab            = NULLHANDLE;
     
    614616}
    615617
     618void Lucide::cmdMinimize()
     619{
     620    if ( isFullscreen ) {
     621        toggleFullscreen();
     622    }
     623    WinSetWindowPos( hWndFrame, HWND_TOP, 0, 0, 0, 0, SWP_MINIMIZE );
     624}
     625
     626void Lucide::cmdSwitchToFullscreen()
     627{
     628    if ( !isFullscreen )
     629    {
     630        SWP pos = {0};
     631        WinQueryWindowPos( hWndFrame, &pos );
     632
     633        if ( pos.fl & SWP_MINIMIZE ) {
     634            WinSetWindowPos( hWndFrame, HWND_TOP, 0, 0, 0, 0,
     635                    SWP_SHOW | SWP_ACTIVATE | SWP_RESTORE | SWP_ZORDER );
     636        }
     637        toggleFullscreen();
     638    }
     639}
     640
    616641static MRESULT EXPENTRY splProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
    617642{
     
    807832                    return (MRESULT)FALSE;
    808833
     834                case CM_MINIMIZE:
     835                    Lucide::cmdMinimize();
     836                    return (MRESULT)FALSE;
     837
     838                case CM_TOFULLSCREEN:
     839                    Lucide::cmdSwitchToFullscreen();
     840                    return (MRESULT)FALSE;
    809841            }
    810842        }
     
    902934
    903935    Lucide::checkNavpane();
     936    initPipeMon( hWndFrame );
    904937
    905938    // Messsage loop
     
    930963    delete title;
    931964    delete settings;
     965    unInitPipeMon();
    932966
    933967    WinDestroyMsgQueue( hmq );
Note: See TracChangeset for help on using the changeset viewer.