win32 - 消息类型

Windows消息的结构体:

MSG

//The MSG structure contains message information from a thread's message queue
typedef struct tagMSG {
        // msg 
    HWND   hwnd;     //窗口句柄, 窗口对象的标识
    UINT   message;  //消息类型 每一个值对应不同的消息类型(点击、 键入)
    WPARAM wParam;   //消息参数
    LPARAM lParam; 	//消息参数
    DWORD  time;   //时间戳
    POINT  pt;     //坐标
} MSG; 
 

窗口函数

//LRESULT :The simple data types supported by the Win32 API are used to define function return values, function and message parameters, and structure members. They define the size and meaning of these elements

//CALLBACK __stdcall
//wParam 、lParam 先查消息类型 在看这俩个参数的意义

LRESULT CALLBACK WindowProc(  //窗口处理函数
	HWND hwnd,      // handle to window
	UINT uMsg,      // message identifier
	WPARAM wParam,  // first message parameter 不同的消息类型 这个参数值也不同
	LPARAM lParam   // second message parameter 不同的消息类型 这个参数值也不同
	)
// 第一个窗口.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"
#include "stdio.h"
#include "第一个窗口.h"
LRESULT CALLBACK WindowProc(  //窗口处理函数
	HWND hwnd,      // handle to window
	UINT uMsg,      // message identifier
	WPARAM wParam,  // first message parameter
	LPARAM lParam   // second message parameter
	){
   
		//WM_CREATE;
		TCHAR szOutBufferMessage[0x80];
		
		
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值