V2EX  ›  英汉词典

Wndproc

定义 Definition

WndProc(全称 Window Procedure)指 Windows 图形界面编程(Win32 API)中的“窗口过程/窗口消息处理函数”,用于接收并处理发送给某个窗口的消息(如鼠标点击、键盘输入、重绘、关闭等)。

发音 Pronunciation (IPA)

/ˈwɪnd.prɑːk/

例句 Examples

A WndProc handles messages like clicks and keystrokes.
WndProc 会处理诸如鼠标点击和键盘输入之类的消息。

In a Win32 app, the window’s WndProc typically switches on message IDs (e.g., WM_PAINT, WM_DESTROY) and calls DefWindowProc for anything it doesn’t handle.
在 Win32 程序中,窗口的 WndProc 通常会根据消息编号(如 WM_PAINT、WM_DESTROY)进行分发,对未处理的消息则调用 DefWindowProc 交给系统默认处理。

词源 Etymology

WndProc 是 Windows 编程领域的缩写写法:Wnd(Window 的缩写,意为“窗口”)+ Proc(Procedure 的缩写,意为“过程/处理函数”)。它源自早期 WinAPI 的命名习惯,强调“用于处理窗口消息的过程函数”。

相关词 Related Words

文学与典籍 Literary Works

  • Programming Windows(Charles Petzold)——经典 Windows 编程书籍中会反复讲解与使用 WndProc(窗口过程)的结构与消息循环配合方式。
  • *Windows via C/C++*(Jeffrey Richter)——讨论 Windows 消息分发、回调与窗口过程时会涉及 WndProc
  • Microsoft MSDN / Win32 API 官方文档(如 “WindowProc function” 主题)——以 WndProc/WindowProc 为核心术语讲解窗口过程签名与消息处理规则。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1877 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 7ms · UTC 01:06 · PVG 09:06 · LAX 17:06 · JFK 20:06
♥ Do have faith in what you're doing.