... COORD dwMousePosition; // 当前鼠标位置 DWORD dwButtonState; // 鼠标按钮状态 DWORD dwControlKeyState; // 键盘控制键状态 ...
基于50个网页-相关网页
显然,在这个例子中,按钮可以拥有默认状态、鼠标悬停(mouse - over)状态和被按下(pressed)状态。
Obviously, in this example, buttons can have a default state, a mouse-over state, and a pressed state.
为了实现这种效果,要创建两组图形;一组用于正常状态,一组用于当鼠标移动到按钮上时的活动状态。
To achieve this effect, two sets of graphics can be created; one for the normal state and one for the active state when the mouse is over the button.
例如,如果您想在鼠标位于按钮之上以及按钮被按下的时候改变按钮上的字体,那么可以使用状态值MOUSE_OVER and PRESSED。
For example, if you want to change fonts on a button when the mouse is over it and the button is pressed, you use a state value of MOUSE_OVER and pressed.
应用推荐