1. Project establishment, file addition, project setup
1.1 File Additions:
Add the Inc, Lib folder under the project directory (note that both folders must be in the same directory as the project):
Add Ini.c, ini.h files under the directory:
1.2 Engineering Setup:
1. Code writing:
2.1 Header files and macros to be added:
Note: To add a dbt.h file, you need to change the Windows version by changing the
Compile the header files before you add them, and then open the StdAfx.h file:
2.2 Adding functions and controls:
2.2.1 Add controls as follows:
The control name and object definitions are as follows:
which
drop-down box idc_hidtargets
edit Box Idc_targets_ctrl
Static text Box Idc_capabilities_list
radio Button Idc_use_set_report
3 small edit boxes are vidpid and version
2.2.2 Add the function as follows:
Note: To add the Refreshdevice () function, you need to manually add the device replacement event in the message event:
Additionally: The drop-down box control needs to add a message event function:
2.2.3 to complete each added function:
Reference D:\Yifei\Personal Information\xinchuang Project\v2_ownhid
(Chipone PC)