W
wuliao
Unregistered / Unconfirmed
GUEST, unregistred user!
function ThreadFunction(Info: Pointer): Integer;
StdCall
var
Count: Integer;
FormDC: HDC;
CountStr: string;
begin
FormDC := GetDC(Form1.Handle);
{display something visual}
for Count := 1 to 1000do
begin
CountStr := IntToStr(Count);
TextOut(FormDC, 10, 10, Pchar(CountStr), Length(CountStr));
end;
ReleaseDC(Form1.Handle, FormDC);
ExitThread(4);
//ExitThread后边的参数应该是退出码,这里的4是随便给的数字还是怎么来的??(另还有Windows.ExitProcess(10);这种写法应该是推出码,但是程序没有什么地方指定退出码为10,也没应用函数取得退出码为10,这里为什么写10呢??)
end;
望解答,谢谢
StdCall
var
Count: Integer;
FormDC: HDC;
CountStr: string;
begin
FormDC := GetDC(Form1.Handle);
{display something visual}
for Count := 1 to 1000do
begin
CountStr := IntToStr(Count);
TextOut(FormDC, 10, 10, Pchar(CountStr), Length(CountStr));
end;
ReleaseDC(Form1.Handle, FormDC);
ExitThread(4);
//ExitThread后边的参数应该是退出码,这里的4是随便给的数字还是怎么来的??(另还有Windows.ExitProcess(10);这种写法应该是推出码,但是程序没有什么地方指定退出码为10,也没应用函数取得退出码为10,这里为什么写10呢??)
end;
望解答,谢谢