V2EX  ›  英汉词典
Enqueued related words: Lresult, Wndproc

WPARAM

释义 Definition

WPARAM 是 Windows API 中用于消息传递的参数类型,通常表示消息的附加信息(很多情况下是按键代码、菜单/控件标识、布尔标志或小整数等)。在 32/64 位系统上它通常是与指针同宽的无符号整数类型(常见实现为 UINT_PTR),常见于窗口过程 WndProc 的参数 wParam

发音 Pronunciation (IPA)

/ˈdʌbəl.juː ˈpɑːrəm/

例句 Examples

Pressing Enter sends WM_KEYDOWN with wParam equal to VK_RETURN.
按下回车会发送 WM_KEYDOWN,其中 wParam 等于 VK_RETURN

In the window procedure, you must interpret wParam differently depending on which message you receive.
在窗口过程中,你必须根据收到的不同消息,以不同方式解读 wParam

词源 Etymology

WPARAM 来自 Windows 编程命名:W(常被理解为 Windows)+ PARAMparameter,参数)。它与 LPARAM 成对出现,用于在消息机制中携带额外信息;传统上常说 wParam 偏向“word/小整数”,但在现代 64 位 Windows 中它被设计为可容纳指针大小的数据。

相关词 Related Words

文献与作品 Literary / Notable Works

  • Microsoft Windows SDK / MSDN 文档(如 Window Procedures, Messages and Message Queues 等条目中大量出现 WPARAM
  • Charles Petzold:《Programming Windows》(讲解 Windows 消息循环与 WndProc 时频繁使用 WPARAM
  • Jeffrey Richter:《Programming Applications for Microsoft Windows》(涉及消息处理与参数传递时出现 WPARAM
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   733 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 19:10 · PVG 03:10 · LAX 11:10 · JFK 14:10
♥ Do have faith in what you're doing.