TAILIEUCHUNG - Microsoft visual C_9

Tham khảo tài liệu 'microsoft visual c_9', 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 Word Application Empty. iFirstChar iChar 1 int iLength for iChar iEditChar iChar iLength isalnum m_stText iChar iChar Empty. iLastChar iChar return iFirstChar iLastChar GetHomeChar is called when the user presses the Home key. First we find out which line the current index holds. Then it returns the index of the first key on that line. GetEndChar is defined in a similar manner. int Paragraph GetHomeChar int iChar const int iLines int for int iIndex 0 iIndex iLines iIndex Line line m_lineArray iIndex int iFirstChar int iLastChar if iChar iLastChar 1 return iFirstChar As the loop above always will find the correct index every character belongs to a line of the paragraph this point of the code will never be reached. The check is for debugging purposes only. check FALSE return 0 ExtractText is called when the user marks one portion of the document s text and then copies it. It creates a new paragraph and fills it with the text and fonts of the marked area. Like GetRepaintSet and SetFont above its two indexes are default parameters. If the last index is -1 the rest of the text will be extracted. The text is easy to extract with CString s Mid method. Unfortunately there is no similar method for arrays. So we must traverse the font array and add fonts one by one to the new paragraph. We also need to set the empty font of the paragraph. If the first index of 344 Chapter 9 the extracted text is less than the length of the text we set the font of the first marked character. Otherwise we use the font of the character preceding the first one. If the text is empty we just copy the empty font. Paragraph Paragraph ExtractText int iFirstIndex 0 int iLastIndex -1 const Paragraph pNewParagraph check_memory pNewParagraph new Paragraph this if int iLength if iLastIndex -1 iLastIndex iLength pNewParagraph- m_stText iFirstIndex iLastIndex - iFirstIndex CRect .

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.