[英]Convert Delphi to Borland C++ builder
How to convert this Delphi code : 如何转换此Delphi代码:
const
cnCursorID1 = 1;
begin
Screen.Cursors[ cnCursorID1 ] :=
LoadCursorFromFile(
'c:\winnt\cursors\piano.ani' );
Cursor := cnCursorID1;
end;
to C++ Builder 到C ++ Builder
The following ought to work, although I haven't tested it. 以下应该工作,虽然我还没有测试过。
const int cnCursorID1 = 1;
Screen->Cursors[cnCursorID1] = LoadCursorFromFile("c:\\winnt\\cursors\\piano.ani");
Cursor = cnCursorID1;
(If you're a regular C++Builder user, you'll find that a lot of example code and third-party libraries are in Delphi, so it's worth learning at least enough Delphi to read it and translate it yourself.) (如果你是一个普通的C ++ Builder用户,你会发现许多示例代码和第三方库都在Delphi中,所以至少要学习Delphi来阅读它并自己翻译它。)
Caveat: Code compiled by eye, don't have Borland compiler to hand. 警告:由眼睛编译的代码,没有Borland编译器可以提供。
{
const int cnCursorID1 = 1;
Screen->Cursors[ cnCursorID1 ] =
LoadCursorFromFile("c:\\winnt\\cursors\\piano.ani" );
Cursor = cnCursorID1;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.