Esempio n. 1
0
LRESULT CModbusPollView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{


	if(MY_FRESH_MBPOLLVIEW==message){
		Fresh_Data();
	}
	return CFormView::WindowProc(message, wParam, lParam);
}
	void CFreezeFunction::OnBnClickedTemp3()
		{
		  UpdateData(TRUE);
		CString str;
		GetDlgItem(IDC_CLOSE)->GetWindowText(str);
		if (!str.IsEmpty())
			{
			int var=write_one(g_tstat_id,297,m_close);
			if (var>0)
				{
				multi_register_value[297]=m_close;
				AfxMessageBox(_T("OK"));
				} 
			else
				{
				AfxMessageBox(_T("Fail to Write"));
				}
			}
		Fresh_Data();
		}
// CFreezeFunction 消息处理程序
  BOOL CFreezeFunction::OnInitDialog()
  {
     CDialog::OnInitDialog();
	Fresh_Data();
	return TRUE;
  }
Esempio n. 4
0
void CModbusPollView::Fresh_View(){
	               Fresh_Data();
}