D:/_sources/u2c_12/ControlPanel/I2cBridgeDevicesBar.cpp
Go to the documentation of this file.00001 // Copyright (C)2006 Diolan ( http://www.diolan.com ) 00002 // 00003 // This program is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU General Public License 00005 // as published by the Free Software Foundation 00006 // 00007 // This program is distributed in the hope that it will be useful, 00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 // GNU General Public License for more details. 00011 00012 00013 00014 #include "stdafx.h" 00015 #include "ControlPanel.h" 00016 #include "I2cBridgeDevicesBar.h" 00017 00018 00019 // CI2cBridgeDevicesBar 00020 00021 IMPLEMENT_DYNAMIC(CI2cBridgeDevicesBar, CDialogBar) 00022 CI2cBridgeDevicesBar::CI2cBridgeDevicesBar() 00023 { 00024 } 00025 00026 CI2cBridgeDevicesBar::~CI2cBridgeDevicesBar() 00027 { 00028 } 00029 00030 00031 BEGIN_MESSAGE_MAP(CI2cBridgeDevicesBar, CDialogBar) 00032 ON_UPDATE_COMMAND_UI(IDC_SCAN_I2C_SLAVE, OnUpdateButtons) 00033 ON_UPDATE_COMMAND_UI(IDC_GET_SN, OnUpdateButtons) 00034 00035 END_MESSAGE_MAP() 00036 00037 void CI2cBridgeDevicesBar::EnableControls(bool bEnable) 00038 { 00039 m_bEnableControls = bEnable; 00040 } 00041 00042 00043 00044 void CI2cBridgeDevicesBar::OnUpdateButtons (CCmdUI* pCmdUI) 00045 { 00046 if(m_bEnableControls) 00047 pCmdUI->Enable(TRUE); 00048 else 00049 pCmdUI->Enable(FALSE); 00050 } 00051 00052 00053 // CI2cBridgeDevicesBar message handlers 00054
2006-2012