L
liufengliang
Unregistered / Unconfirmed
GUEST, unregistred user!
var
wTime :TDateTime;
TestTime : Dword ;
Sm: Msg;
begin
TestTime := GetTickCount ;
//用于获取自windows启动以来经历的时间长度
wTime := GetTickCount + WaitTime;
while wTime>GetTickCount do
begin
//Peekmessage()如果消息隊列中沒有消息,PeekMessage立刻返回0
while(Peekmessage(sm,0,0,0,PM_REMOVE)) do
begin
Translatemessage(sm); //将虚拟键消息转换为字符消息
DispatchMessage(sm); //将消息发送给窗口过程(传递消息)
end;
end;
end;
在串口编程中有什么用,如何调试,这几行?
wTime :TDateTime;
TestTime : Dword ;
Sm: Msg;
begin
TestTime := GetTickCount ;
//用于获取自windows启动以来经历的时间长度
wTime := GetTickCount + WaitTime;
while wTime>GetTickCount do
begin
//Peekmessage()如果消息隊列中沒有消息,PeekMessage立刻返回0
while(Peekmessage(sm,0,0,0,PM_REMOVE)) do
begin
Translatemessage(sm); //将虚拟键消息转换为字符消息
DispatchMessage(sm); //将消息发送给窗口过程(传递消息)
end;
end;
end;
在串口编程中有什么用,如何调试,这几行?