TAILIEUCHUNG - Microsoft visual C_5

Tham khảo tài liệu 'microsoft visual c_5', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | The Draw Application The implementation of Figure is rather straightforward. Remember that each time we introduce a new class to the application we have to include the header file at the beginning of the implementation file. Otherwise the application will not work. include include . include . include . include include TwoDimensionalFigure TwoDimensionalFigure m_bFilled FALSE Empty. TwoDimensionalFigure TwoDimensionalFigure const Color color BOOL bFilled Figure color m_bFilled bFilled Empty. void TwoDimensionalFigure Serialize CArchive archive Figure Serialize archive if archive m_bFilled if archive m_bFilled 184 Chapter 7 The LineFigure Class LineFigure is a direct sub class of Figure. Its task is to draw a line between two points represented by m_ptFirst to m_ptLast. The fields are protected as they are reused by the ArrowFigure which privately inherits LineFigure. The default constructor is necessary due to serialization. The second constructor initializes the object when the user adds a new line to the drawing. The line s color is given and so is its start point. Both the fields m_ptFirst and m_ptLast are set to the start point. When the line is created it has the same start and end point. The field m_eDragMode is originally set to CREATE_LINE by the constructor and to MODIFY_FIRST MODIFY_LAST or MOVE_LINE by Click DoubleClick or Inside depending whether the user clicks on one of the end points of the line or on the line itself. Observe that there is no enumeration constant for the case when the user misses the line. In that case the functions simply return false and ModifyOrMove or Move will not be called. As both LineFigure and ArrowFigure are direct sub classes of Figure and ArrowFigure inherits LineFigure privately a repeated inheritance has occurred. An object of ArrowFigure would have two instances of Figure s field .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.