091023(星期五)扩展TreeItem究竟是谁做的工作?1

本文介绍了ReflectLastMsg函数的使用方法及条件断点设置技巧,并详细解释了该函数的工作原理及其在消息反射机制中的作用。

 

1、  如何跟进TreeCtrl被双击时的ReflectLastMsg函数

条件断点设置方法

Alt+F9

 

 

 

弹出编辑断点对话框,选择设置的断点所在的行;

 

选择Condition…按钮,输入wP==0&&lP==4

 

2、关于ReflectLastMsg的描述

This member function is called by the framework to reflect the last message to the child window.

 

static BOOL PASCAL ReflectLastMsg(

   HWND hWndChild,

   LRESULT* pResult = NULL

);

Parameters

hWndChild

A handle to a child window.

pResult

The result generated by the child window to be returned by the parent window. Can be NULL.

Return Value

Nonzero if the message was handled; otherwise 0.

 

Remarks

This member function calls SendChildNotifyLastMsg if the window identified by hWndChild is an OLE control or a window in the permanent map.

 

Handling Reflected Messages.

Handling Reflected MessagesSee Also

Declaring Message Handler Functions

Message reflection lets you handle messages for a control, such as WM_CTLCOLOR, WM_COMMAND, and WM_NOTIFY, within the control itself消息反射可以在控件内部来处理来自控件的消息. This makes the control more self-contained and portable. The mechanism works with Windows common controls as well as with ActiveX controls (formerly called OLE controls).

Message reflection lets you reuse your CWnd-derived classes more readily. Message reflection works via CWnd::OnChildNotify, using special ON_XXX_REFLECT message map entries: for example, ON_CTLCOLOR_REFLECT and ON_CONTROL_REFLECT. Technical Note 62 explains message reflection in more detail.

 

目前看来并不能确定是ReflectLastMsg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值