我刚创建了一个旋转横幅,可以在下载过程中显示一些图像。
我用过这里的例子
function WrapTimerProc(Callback: TTimerProc; ParamCount: Integer): LongWord;
external 'wrapcallback@files:InnoCallback.dll stdcall';
function SetTimer(hWnd: HWND; nIDEvent, uElapse: UINT; lpTimerFunc: UINT): UINT; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: HWND; uIDEvent: UINT): BOOL;
external 'KillTimer@user32.dll stdcall';
procedure OnSlideTimer(Wnd: HWND; Msg: UINT; TimerID: UINT_PTR; SysTime: DWORD);
begin
case SlideID of
0: SlideID := 1;
1: SlideID := 2;
2: SlideID := 3;
3: SlideID := 4;
4: SlideID := 5;
5: SlideID := 0;
end;
BackImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\' + IntToStr(SlideID + 1))+ ExpandConstant('{cm:imgbase}.bmp'));
end;
procedure StartSlideTimer;
var
TimerCallback: LongWord;
begin
TimerCallback := WrapTimerProc(@OnSlideTimer, 4);
TimerID := SetTimer(0, 0, 7000, TimerCallback);
end;
我将计时器设置为在7秒后开火......但我发现2变化之间的时间总是与7秒不同,并且所有变化都不同。 (如7秒,3秒,6秒,......不同)
有什么问题?