令代码简洁的ON_CONTROL_RANGE

关于ON_CONTROL_RANGE

ON_CONTROL_RANGE(wNotifyCode, id1, id2, memberFxn )

Use this macro to map a contiguous range of control IDs to a single message handler function for a specified Windows notification message, such as BN_CLICKED. The range of IDs starts with id1 and ends with id2. The handler is called for the specified notification coming from any of the mapped controls.There is no automatic support for message map ranges, so you must place the macro yourself.

Parameters

wNotifyCode

The notification code to which your handler is responding.

id1

Command ID at the beginning of a contiguous range of control IDs.

id2

Command ID at the end of a contiguous range of control IDs.

memberFxn

The name of the message-handler function to which the controls are mapped.

例如:

ON_CONTROL_RANGE(<wNotifyCode>, <id><idLast>, <memberFxn>)

afx_msg void memberFxn(UINT uID);

 

你可能感兴趣的:(windows,function,command,Parameters)