1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
InstantResult::InstantResult(CWnd* pParent /*=NULL*/)
: CDialog(InstantResult::IDD, pParent)
{
HWND hwnd;
hwnd = GetSafeHwnd();
m_IdTimer=::SetTimer(hwnd,0,1000,TimerProc); // création d'un timer qui bat à la seconde
m_IdTimer2=::SetTimer(hwnd,1,500,TimerProc2); // création d'un timer qui bat à la seconde
}
VOID CALLBACK TimerProc(HWND /*hwnd*/,UINT /*uMsg*/,UINT_PTR /*idEvent*/,DWORD /*dwTime*/)
{
// timer function
unsigned char NoAuthmov[1]={141}; // not allowed to move command
WriteFile(hcom,NoAuthmov, 1, &m, NULL);
}
VOID CALLBACK TimerProc2(HWND hwnd ,UINT /*uMsg*/,UINT_PTR /*idEvent*/,DWORD /*dwTime*/)
{
CCom::PurgeTx();
CCom::ReadBuffer();
CEdit* editFiD=(CEdit*) GetDlgItem(hwnd,IDC_EDIT4);
editFiD->SetWindowText(data);
} |
Partager