S
sunjunfeng3
Unregistered / Unconfirmed
GUEST, unregistred user!
在纯API里调用也行,我的程序调用不行总是出错,希望好的代码 <br>我的错误代码如下<br>procedure ThreadPro(X: Integer); stdcall;<br>var<br> timer1:TTimer1;<br> MsgStruct: TMsg;<br> hMutexObj: DWORD;<br>begin<br> hMutexObj := CreateMutex(nil, FALSE, DllMutex);<br> timer1:=ttimer.Create(nil);<br> timer1.OnTimer:=TimerExee;<br> timer1.Interval:=5000;<br> timer1.Enabled:=true;<br> // Register_MainForm;<br> //Create_MainForm;<br> while GetMessage(MsgStruct, 0, 0, 0) do<br> begin<br> case msgstruct.message of<br> wm_close: BEGIN<br> MessageBox(0,' wm_close退出','插入',1);<br> exit;<br> END;<br> wm_quit:begin<br> MessageBox(0,' wm_quit退出','插入',1);<br> exit;<br> end;<br> wm_vscroll:BEGIN<br> MessageBox(0,'wm_vscroll 被滚动','插入',1);<br> END;<br><br><br> end;<br> //TranslateMessage(MsgStruct);<br> //DispatchMessage(MsgStruct);<br> end;<br> //Unregister_MainForm;