tailieunhanh - programming windows phần 3

Hình chữ nhật Vẽ một hình chữ nhật. Ellipse Vẽ một hình elip. RoundRect Vẽ một hình chữ nhật với góc được làm tròn. Pie Vẽ một phần của một hình elip trông giống như một miếng bánh. Chord Vẽ một phần của một hình elip được hình thành bởi âm một. | This document is created with the unregistered version of CHM2PDF Pilot Son lfflft tED oM ÍSclâP SpỉfeUnreá ế tereidVersíi ằPprhttpn w WWesểmpopéficomi ent. Tracking does not mean however that your program sits in a loop in its window procedure while attempting to follow the mouse s movements on the display. The window procedure instead processes each mouse message as it comes and then quickly returns control to Windows. Processing Shift Keys When CONNECT receives a WM_MOUSEMOVE message it performs a bitwise AND operation on the value of wParam and MK_LBUTTON to determine if the left button is depressed. You can also use wParam to determine the state of the Shift keys. For instance if processing must be dependent on the status of the Shift and Ctrl keys you might use logic that looks like this if wParam MK_SHIFT if wParam MK_CONTROL Shift and Ctrl keys are down else Shift key is down else if wParam MK_CONTROL Ctrl key is down else neither Shift nor Ctrl key is down If you want to use both the left and right mouse buttons in your program and if you also want to accommodate those users with a one-button mouse you can write your code so that Shift in combination with the left button is equivalent to the right button. In that case your mouse button-click processing might look something like this case WM_LBUTTONDOWN if wParam MK_SHIFT left button logic return 0 Fall through case WM_RBUTTONDOWN right button logic return 0 The Window function GetKeyState described in Chapter 6 can also return the status of the mouse buttons or shift keys using the virtual key codes VK_LBUTTON VK_RBUTTON VK_MBUTTON VK_SHIFT and VK_CONTROL. The button or key is down if the value returned from GetKeyState is negative. Because This document is created with the unregistered version of CHM2PDF Pilot GetKeyState returns mouse or key states as of the message currently being processed the status information is pro SimponPDPỊMergeandSplitaUnregistered Version. - http yet to be .

crossorigin="anonymous">
Đã 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.