TAILIEUCHUNG - Microsoft visual C_6

Tham khảo tài liệu 'microsoft visual c_6', 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 MouseDrag is called when the user moves the mouse with the left button pressed. The distance since the last call to MouseDown or MouseDrag is stored in szDistance. void CDrawDoc MouseDrag const CPoint ptMouse CSize szDistance ptMouse - m_ptPrevMouse m_ptPrevMouse ptMouse If the application is in the single-drag state we call MoveAndModify on the single figure. Whether the figure will be moved of modified depends on the setting of the previous call to Click. We do not really need to know as the information is stored in the figure object. When the figure has been moved or modified we update its old and new area by calling UpdateAllViews. switch m_eApplicationState case SINGLE_DRAG CRect rcOldFigure m_pSingleFigure- GetArea m_pSingleFigure- MoveOrModify szDistance CRect rcNewFigure m_pSingleFigure- GetArea UpdateAllViews NULL LPARAM rcOldFigure UpdateAllViews NULL LPARAM rcNewFigure break If the application is in the multiple-drag state we traverse the figure list and for each marked figure we call Move on the figure. Note that we do not modify the figures in this case. It would be illogical to modify several figures at the same time. case MULTIPLE_DRAG for POSITION position m_figurePtrList. GetHeadPosition position NULL position Figure pFigure position if pFigure- IsMarked CRect rcOldFigure pFigure- GetArea pFigure- Move szDistance CRect rcNewFigure pFigure- GetArea UpdateAllViews NULL LPARAM rcOldFigure 224 Chapter 7 UpdateAllViews NULL LPARAM rcNewFigure break If the application is in the rectangle-drag state we modify the rectangle. Even though we call MoveOrModify the rectangle will be modified not moved because it was created by the call to MouseDown above which puts the rectangle in the modify state. case RECTANGLE_DRAG CRect rcOldInside m_pDragRectangle- GetArea m_pDragRectangle- MoveOrModify szDistance CRect rcNewInside m_pDragRectangle- GetArea UpdateAllViews NULL LPARAM rcOldInside .

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.