路
路远
Unregistered / Unconfirmed
GUEST, unregistred user!
两个api函数GetDlgltem,GetDlgltemText delphi中声明出错,是不是需要在user单元加什么。另:取一个字符串的第N位,N个字符的函数是什么。(100分)<br />有两个api函数GetDlgltem,GetDlgltemText。我声明后也不能运行.<br><br>我这样声明 function GetDlgltem (hDlg:Thandle;nlDDlgltem :integer ): THandle;<br>原型 HWND GetDlgltem(HWND hDlg,int nlDDlgltem);<br>结果出错提示:[Error] Unit1.pas(26): Unsatisfied forward or external declaration: 'GetDlgltem'<br>2.apiGetDlgltemText .<br>我在程序里声明function apiGetDlgltemText (hDlg:THandle;nlDDlltem:integer;DlgltemText:String; nMazCount:integer)char;//<br>返回值:如果函数调用成功,则返回值表示被复制缓冲区的字符串的长度,不包括以NULL结尾的字符串。如果函数调用失败,则返回值为零。<br>原型:UINT GetDlgltemText(HWND hDlg,int nlDDlltem,LPTSTR IpString int nMazCount);<br>出错提示[Error] Unit1.pas(26): Unsatisfied forward or external declaration: 'apiGetDlgltemText'<br>另:取一个字符串的第N位,N个字符的函数是什么。<br>声明位置:<br>type<br> TForm1 = class(TForm)<br> Timer1: TTimer;<br> procedure Timer1Timer(Sender: TObject);<br><br> function GetDlgltem (hDlg:Thandle;nlDDlgltem :integer ): THandle;<br> function GetDlgltemText (hDlg:THandle;nlDDlltem:integer;DlgltemText:String; nMazCount:integer):Char;<br><br><br><br> private<br> { Private declarations }<br> public<br><br> end;<br> <br>