no data exchange control with ID 0x03F7

本文记录了在Wince平台上使用VS2005开发时遇到的界面无响应问题及解决过程。问题源于界面控件ID更改后,数据交换代码未同步更新。

=============================================================

标题:no data exchange control with ID 0x03F7

备注:wince + vs2005

日期:2011.5.13

姓名:朱铭雷

=============================================================

今天调试程序,调着调着突然发现某个界面完全没有响应了。里面有几个ButtonComboBoxListCtrlEdit Control等控件,全部都不响应了。在OnInitDialog中加个断点,发现这都进不来。

Rebuild All

程序也没错误,根据以往的经验,这类问题有可能是Resource.h.rc文件有问题,查了一会也没看出有什么问题。这时候瞄了一眼Output窗口。发现了一条错误信息:

Error: no data exchange control with ID 0x03F7.

呃?data exchange出错了,这肯定是问题的原因了。到Resource.h文件中查找ID值为0x03F7的宏定义,找到了IDC_COMBO1

#define IDC_COMBO1                      1015

整个项目搜索,找到了如下代码行:

void CEpidPrevInfoColDlg::DoDataExchange(CDataExchange* pDX)

{

    CDialog::DoDataExchange(pDX);

    DDX_Control(pDX, IDC_COMBO1, m_CMBAnitype);

    DDX_Control(pDX, IDC_LIST_EAR, m_ListEar);

}

CEpidPrevInfoColDlg,正是出问题的界面。界面上本来有一个ComboBox控件,并且我为之关联了一个控制型变量m_CMBAnitype。但后来我又把这个ComboBox控件的ID修改为IDC_CMB_XUZHONG。但问题来了,上面的DDX_Control部分没有把IDC_COMBO1自动修改为IDC_CMB_XUZHONG

再看.rc资源文件

COMBOBOX        IDC_CMB_XUZHONG,30,31,40,92,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP

这已经修改为了IDC_CMB_XUZHONG

那么DDX_Control(pDX, IDC_COMBO1, m_CMBAnitype);这个信息交换肯定是失效了。所以导致了上面发生的一些列问题。手动把IDC_COMBO1修改为IDC_CMB_XUZHONG,一切恢复正常了。

void CEpidPrevInfoColDlg::DoDataExchange(CDataExchange* pDX)

{

    CDialog::DoDataExchange(pDX);

    DDX_Control(pDX, IDC_CMB_XUZHONG, m_CMBAnitype);

    DDX_Control(pDX, IDC_LIST_EAR, m_ListEar);

}

汗,慢慢积累经验吧。

### CAN ID 0x01 Definition and Usage in Automotive Communication In automotive communication systems utilizing Controller Area Network (CAN), each message is identified by a unique identifier known as the CAN ID. The CAN ID serves multiple purposes including prioritization of messages on the bus and addressing specific nodes within the network. For CAN ID `0x01`, while this particular value does not universally correspond to any standardized function across all vehicles due to manufacturer-specific implementations, it often finds application in diagnostic communications or engine-related data transmission depending upon the vehicle make and model[^1]. When dealing with such identifiers, manufacturers may assign them based on predefined protocols like J1939 where certain ranges are allocated for different types of information exchange between Electronic Control Units (ECUs). However, without referring directly to documentation from a specific automaker regarding their implementation details, one cannot definitively state what exactly CAN ID `0x01` represents in every context. To accurately determine its role within a given system, consulting technical manuals provided by the respective car manufacturer or using tools designed for reading live telemetry data would provide more precise insights into how this ID functions during operation. ```python # Example Python code snippet demonstrating how to filter CAN frames with ID 0x01 import can def process_can_frame(msg): if msg.arbitration_id == 0x01: print(f"Received frame from CAN ID {hex(msg.arbitration_id)}") bus = can.interface.Bus(bustype='socketcan', channel='vcan0') for message in bus: process_can_frame(message) ```
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值