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

                                    //   previously

      static bool IsCreated = false;

      if (!IsCreated)

            Set ();

        // Create own pen

        //

    NewPen.CreatePen( m_PenStyle, m_PenWidth, m_PenRGB );

        // Put new pen into device context

        //

    pOldPen = ClientDC.SelectObject( &NewPen );

        // Set up the current drawing position

      int CX = Vert1.x, CY = Vert2.y, MX = Vert2.x, MY = Vert3.y;

        ////////////////////////////0.707107*************************

      for (int n = 0; n < N - 1; n++)

            for (int m = 0; m < M - 10; m++)

                  ClientDC.SetPixel (M / 4 + CX - (int)(h * m - 0.707107 * th * n), 100 + CY - (int)(Umn[m][n] - 0.707107 * th * n) / 7, CUmn[m][n]);

    ClientDC.MoveTo( Vert0 );

        // Draw 4 sides of the rhomb

        //

    ClientDC.LineTo (CX, CY);

      /*m_PenRGB = RGB (0, 0, 255);

      NewPen.DeleteObject();

      NewPen.CreatePen (m_PenStyle, m_PenWidth, m_PenRGB);

      pOldPen = ClientDC.SelectObject (&NewPen);*/

    ClientDC.MoveTo( Vert1 );

      /*POINT TR[3];

      TR[0].x = 90, TR[0].y = 110;

      TR[1].x = 110, TR[1].y = 90;

      TR[2].x = 110, TR[2].y = 110;

    ClientDC.Polygon (TR, 3);

      int t[3] = {10, 10, 10};

      ClientDC.PolyPolygon (TR, t, 3);*/

    ClientDC.LineTo( CX, CY );

      ClientDC.MoveTo (CX, CY);

      ClientDC.LineTo (CX + 200, CY + 200);

        // Restore the previous pen in the device context

        //

    ClientDC.SelectObject( pOldPen );

    return;

} // end function "LFrameWnd::DrawRhomb"

// EOF

// FILE               : LMainThr.cpp

//

// PROJECT            : testing of the MFC

//                      using menus

//                      in MS Visual C++ 6.0

//

// PURPOSE            : implementation of the class

//                      "LMainThread"

//

// CHANGES

// RefNo.   Date:       Who:    Detail: