Seeing What You've Drawn

编程篇(005)-设计一道JavaScript的 range 算法如下 range(1, 10, 3) 返回 [1, 4, 7, 10]; range(‘A’, ‘F’, 2) 返回 [‘A’, ‘C’, ‘E’]; 请使用 JavaScript 语言实现该功能(可以使用 ES6) 参考答案: function range() { var args = [].slice.call(arguments); // 相当于Array.slice.call(arguments),目的是将arguments对象的数组提出来转化为数组,arguments本身并不是数组而是对象 阅读详情

Seeing What You've Drawn

Unfortunately, there is one small problem with Ruler's output: Unless you're running the program on a very high resolution video adapter, you can't see everything it draws. Even on a 1,280-pixel by 1,204-pixel screen, the window can't be stretched wide enough to make all the output visible. What doesn't fit inside the window's client area is clipped by the GDI. You could modify the sample program to make the ruler shorter, but that still wouldn't do much for someone running Windows on a 640-by-480 screen. No, there's a better solution, one that's entirely independent of the screen resolution. That solution is a scroll bar.

Adding a Scroll Bar to a Window

A scroll bar is a window with an arrow at each end and a traveling "thumb" in between that can be dragged with the mouse. Scroll bars can be oriented horizontally or vertically, but never at an angle. When the user clicks one of the scroll bar arrows, moves the thumb, or clicks the scroll bar shaft, the scroll bar informs the window it's attached to by sending it a message. It's up to the window to decide what, if anything, to do with that message because a scroll bar does very little on its own. It doesn't, for example, magically scroll the window's contents. What it does do is provide a very intuitive and universally recognized mechanism for scrolling backward and forward over a virtual landscape that's too large to fit within the physical confines of a window.

Adding a scroll bar to a window is one of the easiest things you'll ever do in a Windows program. To add a vertical scroll bar, create the window with the WS_VSCROLL style. To add a horizontal scroll bar, use the WS_HSCROLL style. To add horizontal and vertical scroll bars, use both WS_VSCROLL and WS_HSCROLL. Recall from Chapter 1 that the third parameter passed to CFrameWnd::Create is the window style, and that the default is WS_OVERLAPPEDWINDOW. An application that creates a conventional frame window with the statement

Create (NULL, _T ("My Application"));

can create a frame window containing a vertical scroll bar with the statement

Create (NULL, _T ("My Application"), WS_OVERLAPPEDWINDOW ¦ WS_VSCROLL);

Accordingly, Windows provides a scroll bar that extends the height of the window's client area from top to bottom on the right side. If you'd rather have the scroll bar appear on the left, include a WS_EX_LEFTSCROLLBAR flag in Create's optional dwExStyle (seventh) parameter.

Setting a Scroll Bar's Range, Position, and Page Size

After you create a scroll bar, you should initialize it with a range, position, and page size. The range is a pair of integers that define the upper and lower limits of the scroll bar's travel. The position is an integer value that specifies the current location within that range; its value is reflected in the position of the scroll bar thumb. The page size sets the size of the thumb to provide a visual representation of the relationship between the size of the window and the size of the scrollable view. For example, if the scroll bar range is 0 to 100 and the page size is 50, the thumb size is half the scroll bar length. If you don't set the page size, Windows picks a default, nonproportional thumb size for you.

One way to set a scroll bar's range and position is with the CWnd::SetScrollRange and CWnd::SetScrollPos functions. The statement

SetScrollRange (SB_VERT, 0, 100, TRUE);

sets a vertical scroll bar's range to 0 through 100, while the statement

SetScrollPos (SB_VERT, 50, TRUE);

sets the current position to 50 and consequently moves the thumb to the middle of the scroll bar. (For horizontal scroll bars, use SB_HORZ instead of SB_VERT.) A scroll bar maintains a record of its current range and position internally. You can query for those values at any time with CWnd::GetScrollRange and CWnd::GetScrollPos.

The TRUE parameter passed to SetScrollRange and SetScrollPos specifies that the scroll bar should be redrawn to reflect the change. You can prevent redraws by specifying FALSE. If you specify neither TRUE nor FALSE, both SetScrollRange and SetScrollPos default to TRUE. You generally want a scroll bar to redraw itself after one of these functions is called, but not if both are called in quick succession. Redrawing a scroll bar twice in a very short period of time produces an undesirable flashing effect. If you're setting the range and the position together, do it like this:

SetScrollRange (SB_VERT, 0, 100, FALSE);
SetScrollPos (SB_VERT, 50, TRUE);

SetScrollPos and SetScrollRange date back to the very first version of Windows. In today's versions, the preferred way to set a scroll bar's range and position is with the CWnd::SetScrollInfo function. In addition to allowing the range and the position to be set with a single function call, SetScrollInfo also provides a means—the only means, as it turns out—for setting the page size. SetScrollInfo accepts three parameters:

  • An SB_VERT or SB_HORZ parameter that specifies whether the scroll bar is vertical or horizontal (or SB_BOTH if you want to initialize two scroll bars at once)

  • A pointer to a SCROLLINFO structure

  • A BOOL value (TRUE or FALSE) that specifies whether the scroll bar should be redrawn

SCROLLINFO is defined as follows in Winuser.h:

typedef struct tagSCROLLINFO
{
    UINT    cbSize;
    UINT    fMask;
    int     nMin;
    int     nMax;
    UINT    nPage;
    int     nPos;
    int     nTrackPos;
} SCROLLINFO, FAR *LPSCROLLINFO;

cbSize specifies the size of the structure, nMin and nMax specify the scroll bar range, nPage specifies the page size, and nPos specifies the position. nTrackPos is not used in calls to SetScrollInfo, but it returns the scroll bar's thumb position when the complementary GetScrollInfo function is called to retrieve information about the scroll bar while the thumb is being dragged. The fMask field holds a combination of one or more of the following bit flags:

  • SIF_DISABLENOSCROLL, which disables the scroll bar

  • SIF_PAGE, which indicates that nPage holds the page size

  • SIF_POS, which indicates that nPos holds the scroll bar position

  • SIF_RANGE, which indicates that nMin and nMax hold the scroll bar range

  • SIF_ALL, which is equivalent to SIF_PAGE ¦ SIF_POS ¦ SIF_RANGE.

SetScrollInfo ignores fields for which bit flags are not specified. The statements

SCROLLINFO si;
si.fMask = SIF_POS;
si.nPos = 50;
SetScrollInfo (SB_VERT, &si, TRUE);

set the position while leaving the range and page size unaffected, and

SCROLLINFO si;
si.fMask = SIF_RANGE ¦ SIF_POS ¦ SIF_PAGE;  // Or SIF_ALL
si.nMin = 0;
si.nMax = 99;
si.nPage = 25;
si.nPos = 50;
SetScrollInfo (SB_VERT, &si, TRUE);

sets the range, page size, and position in one operation. You don't need to initialize cbSize before calling SetScrollInfo or GetScrollInfo because MFC initializes it for you.

You can make a scroll bar disappear by setting the upper limit of its range equal to the lower limit. The scroll bar doesn't go away entirely; it's still there, even though you can't see it, and—more important—you can bring it back by making the range upper and lower limits different again. This turns out to be quite a useful trick if you want to hide the scroll bar because the window has been enlarged to the point that a scroll bar is no longer required. SetScrollInfo's SIF_DISABLENOSCROLL flag prevents a scroll bar from accepting further input, but it doesn't make the scroll bar disappear. Having a disabled scroll bar visible inside a window can be confusing to users, who are apt to wonder why the scroll bar is there if it can't be used.

When you set a scroll bar's range, page size, and position, here's a convenient model to keep in mind. Suppose your window's client area is 100 units high and the workspace you want to cover with a vertical scroll bar is 400 units high. Set the scroll bar range to 0-399 and the page size to 100. Accordingly, Windows will draw the scroll bar thumb so that it is one-fourth the height of the scroll bar. When the scroll bar position is 0, the thumb is positioned at the top of the scroll bar. As the thumb is scrolled down, scroll the contents of your window up an amount proportional to the distance the thumb was moved. If you limit the scroll bar's maximum position to 300 (the difference between the magnitude of the scroll bar range and the page size), the bottom of the thumb will reach the bottom of the scroll bar at the same time that the bottom of the workspace scrolls into view at the bottom of the window.

Synchronizing the Thumb Size and the Window Size

Since a scroll bar's thumb size reflects the relative size of the window compared to the width or the height of the virtual workspace, you should update the thumb size when the window size changes. It's easy to do: Just call SetScrollInfo with an SIF_PAGE flag each time your window receives a WM_SIZE message. The first WM_SIZE message comes when a window is created. Subsequent WM_SIZE messages arrive whenever the window's size changes. In MFC, an ON_WM_SIZE entry in a class's message map directs WM_SIZE messages to a handler named OnSize. The handler is prototyped as follows:

afx_msg void OnSize (UINT nType, int cx, int cy) 

The nType parameter informs the window whether it has been minimized, maximized, or simply resized by using the code SIZE_MINIMIZED, SIZE_MAXIMIZED, or SIZE_RESTORED, respectively. cx and cy are the client area's new width and height in pixels. If you know the dimensions of your application's virtual workspace, you can set the thumb size accordingly.

Processing Scroll Bar Messages

A scroll bar notifies its owner (the window to which it is attached) of scroll bar events by sending messages. A horizontal scroll bar sends WM_HSCROLL messages, and a vertical scroll bar sends WM_VSCROLL messages. In MFC, these messages are directed to a window's OnHScroll and OnVScroll functions by ON_WM_HSCROLL and ON_WM_VSCROLL entries in the window's message map. Scroll bar message handlers are prototyped like this:

afx_msg void OnHScroll (UINT nCode, UINT nPos, CScrollBar* pScrollBar)
afx_msg void OnVScroll (UINT nCode, UINT nPos, CScrollBar* pScrollBar)

nCode identifies the type of event that precipitated the message; nPos contains the latest thumb position if the thumb is being dragged or was just dragged and released; and, for a scroll bar that was created by adding a WS_HSCROLL or WS_VSCROLL style bit to a window, pScrollBar is NULL.

There are seven different event notifications that an application might receive in OnVScroll's nCode parameter, as shown in the table below.

Event CodeSent When
SB_LINEUPThe arrow at the top of the scroll bar is clicked.
SB_LINEDOWN The arrow at the bottom of the scroll bar is clicked.
SB_PAGEUP The scroll bar shaft is clicked between the up arrow and the thumb.
SB_PAGEDOWN The scroll bar shaft is clicked between the thumb and down arrow.
SB_ENDSCROLL The mouse button is released, and no more SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, or SB_PAGEDOWN notifications are forthcoming.
SB_THUMBTRACK The scroll bar thumb is dragged.
SB_THUMBPOSITION The thumb is released after being dragged.

Horizontal scroll bars send the same notifications as vertical scroll bars, but the notifications have slightly different meanings. For a horizontal scroll bar, SB_LINEUP signifies that the left arrow was clicked, SB_LINEDOWN means the right arrow was clicked, SB_PAGEUP means the scroll bar was clicked between the left arrow and the thumb, and SB_PAGEDOWN means the scroll bar was clicked between the thumb and the right arrow. If you prefer, you can use SB_LINELEFT, SB_LINERIGHT, SB_PAGELEFT, and SB_PAGERIGHT rather than SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, and SB_PAGEDOWN. The discussions in the remainder of this chapter deal exclusively with vertical scroll bars, but keep in mind that anything said about vertical scroll bars also applies to horizontal scroll bars.

If the user clicks a scroll bar or scroll bar arrow and leaves the mouse button pressed, a series of SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, or SB_PAGEDOWN notifications will arrive in rapid succession—similar to the stream of typematic key codes generated when a key is held down. SB_ENDSCROLL terminates a stream of UP or DOWN notifications and indicates that the mouse button has been released. Even a single click of a scroll bar or scroll bar arrow generates an UP or a DOWN notification followed by an SB_ENDSCROLL notification. Similarly, a window is bombarded with SB_THUMBTRACK notifications that report new thumb positions as a scroll bar thumb is dragged, and it receives an SB_THUMBPOSITION notification when the thumb is released. When an SB_THUMBTRACK or SB_THUMBPOSITION notification arrives, the message's nPos parameter holds the latest thumb position. For other event codes, the value of nPos is undefined.

How your program responds to scroll bar event messages is up to you. Most programs that use scroll bars disregard SB_ENDSCROLL messages and respond to SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, and SB_PAGEDOWN messages instead. A typical response to SB_LINEUP and SB_LINEDOWN messages is to scroll the contents of the window up or down one line and call SetScrollPos or SetScrollInfo to set the new scroll bar position and update the thumb location. "Line" can have whatever physical meaning you want it to have; it might mean 1 pixel, or it might mean the height of one line of text. Similarly, the usual response to SB_PAGEUP and SB_PAGEDOWN messages is to scroll up or down a distance equal to or slightly less than one "page," which is typically defined as the height of the window's client area or slightly less, and to call SetScrollInfo to set the new scroll position. In any event, it's your responsibility to update the scroll bar position. The scroll bar doesn't do that by itself.

Another, though less common, approach to processing UP and DOWN notifications is to continually move the scroll bar thumb by calling SetScrollPos or SetScrollInfo but to defer scrolling the window until an SB_ENDSCROLL notification arrives. I once used this technique in a multimedia application that was relatively slow to respond to positional changes so that the latency of commands sent to a CD-ROM drive wouldn't impede the smooth movement of the scroll bar thumb.

SB_THUMBTRACK and SB_THUMBPOSITION notifications are handled a little differently. Since SB_THUMBTRACK notifications are liable to come fast and furious when the thumb is dragged, some Windows applications ignore SB_THUMBTRACK notifications and respond only to SB_THUMBPOSITION notifications. In this case, the window doesn't scroll until the thumb is released. If you can scroll the contents of your window quickly enough to keep up with SB_THUMBTRACK notifications, you can make your program more responsive to user input by scrolling as the thumb is dragged. It's still up to you to update the scroll bar position each time you scroll the window. Windows animates the movement of the scroll bar thumb as it's dragged up and down, but if you fail to call SetScrollPos or SetScrollInfo in response to SB_THUMBTRACK or SB_THUMBPOSITION notifications, the thumb will snap back to its original position the moment it's released.

Scrolling a Window

Now that you understand how a scroll bar works, it's time to think about how to scroll the contents of a window in response to scroll bar messages.

The simplest approach is to change the scroll bar position each time a scroll bar message arrives and to call CWnd::Invalidate to force a repaint. The window's OnPaint handler can query the scroll bar for its current position and factor that information into its output. Unfortunately, scrolling a window this way is slow—very slow, for that matter. If the user clicks the up arrow to scroll the window contents up one line, it's wasteful to redraw the entire window because most of the information you want to display is already there, albeit in the wrong location. A more efficient approach to processing SB_LINEUP messages is to copy everything currently displayed in the window down one line using a fast block copy and then to draw just the new top line. That's what CWnd::ScrollWindow is for.

ScrollWindow scrolls the contents of a window's client area—in whole or in part—up or down, left or right, by 1 or more pixels using a fast block pixel transfer. Moreover, it invalidates only the part of the window contents that is "uncovered" by the scrolling operation so that the next WM_PAINT message doesn't have to repaint the entire window. If ScrollWindow is called to scroll a window downward by 10 pixels, it performs the scroll by doing a block copy. Then it invalidates the window's top 10 rows. This activates OnPaint and causes only the top 10 rows to be redrawn. Even if OnPaint tries to redraw the contents of the entire client area, performance is improved because most of the output is clipped. A smart OnPaint handler can further boost performance by restricting its GDI calls to those that affect pixels in the window's invalid rectangle. You'll see sample programs in Chapters 10 and 13 that use this technique to optimize scrolling performance.

ScrollWindow accepts four parameters. Two are required and two are optional. The function is prototyped as follows:

void ScrollWindow (int xAmount, int yAmount,
    LPCRECT lpRect = NULL, LPCRECT lpClipRect = NULL)

xAmount and yAmount are signed integers that specify the number of pixels to scroll horizontally and vertically. Negative values scroll left and up, while positive values scroll right and down. lpRect points to a CRect object or a RECT structure that specifies the part of the client area to scroll, and lpClipRect points to a CRect object or a RECT structure that specifies a clipping rectangle. Specifying NULL for lpRect and lpClipRect scrolls the contents of the entire client area. The statement

ScrollWindow (0, 10);

scrolls everything in a window's client area downward by 10 pixels and prompts a redraw of the first 10 rows.

You can use ScrollWindow whether your application displays text, graphics, or both. In Windows all things are graphical—including text.

用AI+Playwright实现零代码UI自动化测试:以登录页面为例的实战指南 本文详细介绍了如何利用AI与Playwright结合实现零代码UI自动化测试,特别以登录页面为例进行实战演示。通过自然语言描述生成测试脚本,大幅降低技术门槛,提升测试效率,并支持跨浏览器验证。适合非技术人员快速上手专业级自动化测试。 阅读详情

相关推荐

MNE-python 进行源定位教程(一)配置环境

根据MNE官网提供的教程进行复现,遇到各种问题的记录。 配置环境 python3.8 + Anaconda + pycharm MNE-Python 是一个开源 Python 模块,用于处理、分析和可视化功能性神经影像数据(EEG、MEG、sEEG、ECoG 和 fNIRS)。 根据官方建议,将MNE-python安装在anaconda的虚拟环境中。 1. 安装Anaconda 过程点击这里 2. 配置pycharm 2.1 导入MNE-python工具包 在pycharm的菜单栏里打开VCS-Create

zQIANYUN的博客 3176

Pairs of integers

HDOJ 1554 You are to find all pairs of integers such that their sum is equal to the given integer number N and the second number results from the first one by striking out one of its digits. The firs...

蒟蒻的博客 522

App inventor2通过蓝牙控制Arduino Uno LED开关

App inventer2控制Arduino Uno LED开关 如果学会这个小程序,大部分的手机通过蓝牙控制Arduino的功能都可以实现,这个小示例是通过蓝牙模块向Arduino发送"0"和"1",而其它功能要发送其它不同的字符串内容给Arduino. 所需硬件: Arduino Uno JDY-16 蓝牙模块(我的是蓝牙4.2版本) 草帽LED(可选) 手机(我用的是安卓,苹果手机应该也可以,最近其应用商店也有App inventor(AI)伴侣) 软件: Aduino IDE或者Platfom

Firmin123456的博客 5507

POJ 1117:Pairs of Integers

题目链接:http://poj.org/problem?id=1117 题目翻译:给出一个数N,求X+Y = N的所有数对(X,Y),X,Y有如下要求,Y是X 这个数删除一位所得到的数,X不能含有前导0,但是Y可以含有前导0. 解题思路: 思路来源:http://poj.org/showmessage?message_id=350873 可以把X看成三部分。 A

温姑娘的博客 1071

从零到一:移远EC200UCN_LA OpenCPU开发中的‘避坑’实战指南

本文详细介绍了移远EC200UCN_LA 4G通信模块的OpenCPU开发实战指南,涵盖开发环境搭建、项目构建、通信接口开发、调试技巧及固件升级等关键环节。通过避坑经验和实用技巧,帮助开发者高效完成二次开发,提升4G通信模块的应用开发效率。

weixin_29159711的博客 509

第7篇-SAP MM模块-JIT应用实战解析,从计划协议到JIT供应的关键配置与流程

本文深入解析SAP MM模块中的JIT(Just In Time)供应模式,从计划协议到JIT供应的关键配置与流程。通过动态计划行管理、需求聚合与分解等核心功能,实现精确数量、时间和地点的物料供应。文章详细介绍了主数据准备、计划协议配置、MRP参数精调及EDI集成方案,并提供了实施中的典型问题与解决方案,助力企业优化供应链管理。

weixin_30363509的博客 954

[LeetCode]632. Smallest Range 深入浅出讲解和代码示例

讲解了Leetcode中Smallest Range的解题思路,涵盖了归并、哈希、Comparator(Java自定义排序)等知识点

karen0310的专栏 2647

在实车上进行lio-sam测试

PS:将雷达和imu相对固定后,拆下来,原地晃啊晃,直到xyz进度达到百分百,参考gif。标定完成后,会在result文件夹下生成result.txt。

如果想成为中心,那么就到中心去吧。 1001

cs61a spring 2018 Container笔记和补充

原文链接:http://composingprograms.com/pages/23-sequences.html What is sequences? A sequence is an ordered collection of values. It is a collection of behaviors that are shared among ...

weixin_30300523的博客 179

uniapp - 如何跟内嵌 web-view 组件内的网页交互,与 web-view 内嵌网页进行双向通信(uniapp 与 webview 网页之间的 “相互“ 传值)提供详细的示例代码及解决方案

uni-app如何实现在H5环境中与web-view中的网页交互通讯uniappuni-app 与 web-view内嵌网页 双向通信 如何跟内嵌web-view交互uniappAPP与webview子页面交互uniappAPP与webview子页面交互关于uni-app 使用 web-view 页面之间互相跳转、通信等问题uniapp的web-view嵌入网页,网页与uniapp通信webview如何与uniapp写的H5页面交互嵌套webview调用uniapp各种API组件实现H5和app通讯和交互

✅ 精选推荐文章 1万+

ADBC 全面解析:ABAP 开发者玩转 Native SQL 的实战指南

本文介绍了 SAP ABAP 中的 ADBC(ABAP Database Connectivity)技术,它是一种基于 ABAP 面向对象的类库,用于访问 Native SQL 接口。与 Open SQL 和 EXEC SQL 相比,ADBC 具有以下优势:支持特定数据库语法、可访问二级数据库连接、执行多种 SQL 操作且语法更 ABAP 化。文章通过示例展示了 ADBC 的基本用法,包括创建语句对象、执行查询和处理结果集。建议在需要数据库特有功能或二级连接时优先使用 ADBC,同时提供封装类来简化调用。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 323

Seeing What You've Drawn (转)

Seeing What You've Drawn (转)[@more@]Seeing What You've Drawn Unfortunately, there is one small problem with Ruler...

csd3176的博客 90

使用Mask2Former和X-Decoder训练自定义数据集及结果复现报告

本报告记录了使用MMDetection框架中的Mask2Former和X-Decoder模型在自定义数据集上的训练过程。报告包含环境配置、数据集准备、模型训练与优化(解决了Mask2Former的PQ值异常问题)、性能评估等关键环节。详细展示了从数据集转换(将客户提供的COCO格式数据适配MMDetection框架)、配置文件修改、到最终模型训练和评估的全流程。特别针对Mask2Former训练中的PQ值异常问题提供了解决方案,并对比了两种模型在自定义数据集上的表现。报告还包含完整的代码实现和技术细节。

huanghm88的专栏 1122

leetcode刷题

2017/3/1 215. Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For...

weixin_30254435的博客 348

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

刷紫书第三章例题(例题3-4,3-5,3-6)

例题3-4 Master-Mind Hints UVA - 340发顺丰

ccnuacmhdu的博客 865

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

MFC Application

Your First MFC ApplicationIts time to build your first MFC application. And what better place to start than with one that displays "Hello, MFC" in a window? Based on the classic "Hello, world" prog

lemonade的专栏 3641

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Bitmaps

BitmapsThe bitmapped image, or simply bitmap, is a staple of modern computer graphics because it allows computers to store complex images in the form of 1s and 0s. In Windows, bitmaps are GDI object

lemonade的专栏 2487

The WM_NCHITTEST Message

 The WM_NCHITTEST MessageBefore a window receives a client-area or nonclient-area mouse message, it receives a WM_NCHITTEST message accompanied by the cursors screen coordinates. Most application

lemonade的专栏 2482

Printing with Documents and Views

Printing with Documents and ViewsMFCs print architecture is built around a kernel formed by GDI printing functions and virtual CView member functions. To understand whats on the outside, it helps

lemonade的专栏 2079

Getting Input from the Keyboard

Getting Input from the KeyboardA Windows application learns of keyboard events the same way it learns about mouse events: through messages. A program receives a message whenever a key is pressed or

lemonade的专栏 1896

Palettes

PalettesHave you ever written a Windows application that makes generous use of color only to find that the output looks crummy on 16-color and 256-color video adapters? Theres not a whole lot you c

lemonade的专栏 1827

Getting Input from the Mouse

Getting Input from the MouseWindows uses a number of different messages—more than 20 in all—to report input events involving the mouse. These messages fall into two rather broad categories: client-a

lemonade的专栏 1796
上一篇: The Brush Origin
下一篇: The Accel Application
lemonade
博客等级 码龄26年 8粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值