TAILIEUCHUNG - Visual C++ and MFC Fundamentals programming phần 9

Trong thực tế, chúng ta sẽ thấy trong bài học này, tất cả các điều khiển có kiểu tĩnh có một định danh gọi là IDC_STATIC. Nếu, vì lý do nào, bạn muốn đề cập đến một nhãn trong mã của bạn, trước tiên bạn phải thay đổi nhận dạng của nó từ IDC_STATIC cái gì khác. Như đã nêu đã có, các khía cạnh quan trọng nhất của một nhãn văn bản nó sẽ hiển thị. Đây là thuộc tính Caption. Nếu nhãn được sử dụng để xác định một điều khiển, bạn có thể giúp người dùng. | Chapter 18 Progress-Based Controls Visual C and MFC Fundamentals 4. Add another Vertical Scroll Bar to the right of the erxisting one Change its ID to IDC_SCROLL_GREEN Add a Control Variable for the new scroll bar and name it m_ScrollGreen 5. Add a Static Text under the new scroll bar CChange its ID to IDC_VAL_GREEN Add a CString Value Variable for the new label and name it m_ValGreen 6. Add one more scroll bar control to the right of the others Change its ID to IDC_SCROLL_BLUE Add a Control Variable for it and name it m_ScrollBlue 7. Add a Static Text under the new scroll bar CChange its ID to IDC_VAL_BLUE Add a CString Value Variable for the new label and name it m_ValBlue 8. Save All ScrollBar Properties There are two forms of the scroll bars. The horizontal scroll bar allows the user to scroll in the left and right directions. The vertical scroll bar allows scrolling up and down. Visual C allows you to visual select the desired one and add to it a host. If you are programmaticall creating the control you can add the SBS_HORZ style to get horizontal scroll bar. This is also the default meaning that it you do not specify the orientation the scroll bar would be horizontal. If you want a vertical scroll bar instead add the SBS_VERT style BOOL CScrollingDlg OnInitDialog CDialog OnInitDialog TODO Add extra initialization here Scroller- Create WS_CHILD WS_VISIBLE SBS_VERT CRect 200 15 320 148 this 0x16 return TRUE return TRUE unless you set the focus to a control EXCEPTION OCX Property Pages should return FALSE 586 FunctionX Inc. Visual C and MFC Fundamentals Chapter 18 Progress-Based Controls As mentioned already you can resize a scroll bar control to have the dimensions of your choice. If you are programmatically creating the control it would assume the size allocated during design or the nWidth and the nHeight members of the rect argument of the Created method. Internally the operating system has a default width for a vertical scroll bar and a .

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.