Оконное приложение для построения 3d-графиков квадратичной функции, страница 3

    // ON MENU PENSTYLE DOT:      (09.09.1999)

    //   process selection of menu item "PenStyle.Solid"

    //

void LFrameWnd::OnMenuPenstyleDot( void )

{

    m_PenStyle = PS_DOT;

    CWnd::Invalidate( );

    return;

} // end function "LFrameWnd::OnMenuPenstyleDot"

                                    // LFrmWnd.cpp   Page 05

    // Message handler(s) (continued)

    // ON MENU DIALOG STYLE:        (09.09.1999)

    //   process selection of menu item "Dialog.Style"

    //

void LFrameWnd::OnMenuDialogStyle( void )

{

    LStyleDialog        StyleDlg( this );

                                    // STYLE DiaLoG:

                                    //   the pen style dialog

    int                 DlgResult;  // DiaLoG RESULT:

                                    //   the result of "StyleDlg"

    StyleDlg.m_OldPenStyle = m_PenStyle;

    DlgResult = StyleDlg.DoModal( );

    if (DlgResult == IDOK)

    {

        m_PenStyle = StyleDlg.m_NewPenStyle;

    }

    else

    {

        m_PenStyle = StyleDlg.m_OldPenStyle;

    }

    CWnd::Invalidate( );

    return;

} // end function "LFrameWnd::OnMenuDialogStyle"

                                    // LFrmWnd.cpp   Page 06

    // Drawing in the client area

    // TRY PEN STYLE:               (09.09.1999)

    //   try to paint with the given pen style

    //

void LFrameWnd::TryPenStyle

    (

    int                 PenStyle    // PEN STYLE:

                                    //   pen style to try

    )

{

    m_PenStyle = PenStyle;

    CWnd::Invalidate( );

    return;

} // end function "LFrameWnd::TryPenStyle"

    // DRAW PICTURE:               (09.09.1999)

    //   draw the desired picture in the client area

    //

void LFrameWnd::DrawPicture( void )

{

    SetRhombVertexes( );

    DrawRhomb( );