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

    // Message Map definition

    //

BEGIN_MESSAGE_MAP( LStyleDialog, CDialog )

    ON_BN_CLICKED( IDC_RADIO_SOLID, OnRadioSolidClick )

    ON_BN_CLICKED( IDC_RADIO_DASH,  OnRadioDashClick )

    ON_BN_CLICKED( IDC_RADIO_DOT,   OnRadioDotClick )

END_MESSAGE_MAP( )

    // L STYLE DIALOG:              (09.09.2000)

    //   constructor

    //

LStyleDialog::LStyleDialog

    (

    CWnd *              pParent     // Pointer to PARENT:

                                    //   pointer to

                                    //   parent or owner window;

                                    //   if NULL: parent is set to

                                    //   main application window

    ) :

    CDialog( IDD_DIALOG_STYLE, pParent )

{

    return;

} // end function "LStyleDialog::LStyleDialog"

                                    // LStyDlg.cpp   Page 02

    // ON INIT DIALOG:          (09.09.2000)

    //   process the dialog initialization

    //

BOOL LStyleDialog::OnInitDialog( void )

{

    CDialog::OnInitDialog( );

    pRadioSolid = (CButton *)GetDlgItem( IDC_RADIO_SOLID );

    pRadioDash  = (CButton *)GetDlgItem( IDC_RADIO_DASH );

    pRadioDot   = (CButton *)GetDlgItem( IDC_RADIO_DOT );

    m_NewPenStyle = m_OldPenStyle;

    switch ( m_NewPenStyle )

    {

    case PS_SOLID:

        pRadioSolid->SetCheck( 1 );

        break;

    case PS_DASH:

        pRadioDash->SetCheck( 1 );

        break;

    case PS_DOT:

        pRadioDot->SetCheck( 1 );

        break;

    }

    return ( TRUE );

} // end function "LStyleDialog::OnInitDialog"

                                    // LStyDlg.cpp   Page 03

    // ON OK:                       (09.09.2000)

    //   process the dialog finish "OK"

    //

void LStyleDialog::OnOK( void )

{

    pRadioSolid = (CButton *)GetDlgItem( IDC_RADIO_SOLID );