I was testing some Win32 apps with c++, and in this code:

LRESULT CALLBACK WindowProc(

_In_ HWND hwnd,

_In_ UINT uMsg,

_In_ WPARAM wParam,

_In_ LPARAM lParam

);

Looking at this MSDN Documentation, I couldn't really understand what the HWND is?

It says: A handle to the window.. What does that mean?

有帮助吗?

解决方案

The answer is there behind the "Conceptual" section link on the MSDN page you refer to.

About Windows - Window Handle:

Window Handle

After creating a window, the creation function returns a window handle that uniquely identifies the window. A window handle has the HWND data type; an application must use this type when declaring a variable that holds a window handle. An application uses this handle in other functions to direct their actions to the window.

About Window Procedures

Structure of a Window Procedure

A window procedure is a function that has four parameters and returns a signed value. The parameters consist of a window handle, a UINT message identifier, and two message parameters declared with the WPARAM and LPARAM data types. For more information, see WindowProc.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top