View Single Post
Old 05-12-2008, 04:15 PM   #2
Mr.Bi
Đệ tử 7 túi
 
Tham gia ngày: Jul 2007
Nơi Cư Ngụ: Đà Nẵng
Bài gửi: 188
:
Trích:
Nguyên văn bởi trieutuduong View Post
xin giải thích giùm chương trình sau , và cho biết dùng để làm gì . cám ơn các bác trước .
chương trình :
void CTest2Dlg::OnXit()
{
// TODO: Add your control notification handler code here
int r;
r = _outp(0x0378,0x00);
OnOK();
}
void CTest2Dlg::OnUp()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
if(a<45) a+=5;
else MessageBox("Maximum speed limit");
m_speedfact.Format("%d", a);
UpdateData(FALSE);
}
void CTest2Dlg::OnDwn()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
if(a>-45) a-=5;
else MessageBox("Minimum speed limit");
m_speedfact.Format("%d", a);
UpdateData(FALSE);
}
void CTest2Dlg::OnFwd()
{
// TODO: Add your control notification handler code here
int p;
int z = 5000/(2*m_sf);
for(int i=0;i<z;i++)
{
p = _outp(0x0378,0x03);
Sleep(m_sf + a);
p = _outp(0x0378,0x00);
Sleep(m_sf - a);
}
}
void CTest2Dlg::OnRew()
{
// TODO: Add your control notification handler code here
int p;
int z = 5000/(2*m_sf);
for(int i=0;i<z;i++)
{
p = _outp(0x0378,0x0C);
Sleep(m_sf + a);
p = _outp(0x0378,0x00);
Sleep(m_sf - a);
}
}
hix , bác này thấy đoạn code này ở đâu , vác về vứt phẹt vào đây oy kiu giải thích . Đây chỉ là các hàm thui , ko phải là chương trình .
Mr.Bi vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn