请问有没人帮我把ITextHost在MSDN里面的C++声明翻译成delphi的? ( 积分: 100 )

  • 主题发起人 主题发起人 qabo
  • 开始时间 开始时间
Q

qabo

Unregistered / Unconfirmed
GUEST, unregistred user!
ITextHost Interface &nbsp; &nbsp;textserv.h<br><br>HRESULT OnTxCharFormatChange(const CHARFORMAT * pcf);<br>HRESULT OnTxParaFormatChange(const PARAFORMAT * ppf);<br>HRESULT TxActivate(LONG * plOldState);<br>HRESULT TxGetPasswordChar(TCHAR * pch);<br>HRESULT TxGetParaFormat(const PARAFORMAT * * ppPF);<br>HRESULT TxGetMaxLength(DWORD * pLength);<br>BOOL TxClientToScreen(LPPOINT lppt);<br>BOOL TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight);<br>HRESULT TxDeactivate(LONG lNewState);<br>BOOL TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags);<br>HRESULT TxGetAcceleratorPos(LONG * pcp);<br>HRESULT TxGetBackStyle(TXTBACKSTYLE * pstyle);<br>HRESULT TxGetCharFormat(const CHARFORMAT * * ppCF);<br>HRESULT TxGetClientRect(LPRECT prc);<br>HDC TxGetDC(VOID);<br>HRESULT TxGetExtent(LPSIZEL lpExtent);<br>HRESULT TxGetPropertyBits(DWORD dwMask, DWORD * pdwBits);<br>HRESULT TxGetScrollBars(DWORD * pdwScrollBar);<br>HRESULT TxGetSelectionBarWidth(LONG * lSelBarWidth);<br>COLORREF TxGetSysColor(INT nIndex);<br>HRESULT TxGetViewInset(LPRECT prc);<br>HIMC TxImmGetContext(VOID);<br>VOID TxImmReleaseContext(HIMC HIMC);<br>VOID TxInvalidateRect(LPCRECT prc, BOOL fMode);<br>VOID TxKillTimer(UINT idTimer);<br>HRESULT TxNotify(DWORD iNotify, VOID * pv);<br>INT TxReleaseDC(HDC HDC);<br>BOOL TxScreenToClient(LPPOINT lppt);<br>VOID TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll);<br>VOID TxSetCapture(BOOL fCapture);<br>BOOL TxSetCaretPos(INT x, INT y);<br>VOID TxSetCursor(HCURSOR hcur, BOOL fText);<br>VOID TxSetFocus(VOID);<br>BOOL TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw);<br>BOOL TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw);<br>BOOL TxSetTimer(UINT idTimer, UINT uTimeout);<br>BOOL TxShowCaret(BOOL fShow);<br>BOOL TxShowScrollBar(INT fnBar, BOOL fShow);<br>VOID TxViewChange(BOOL fUpdate);
 
ITextHost Interface &nbsp; &nbsp;textserv.h<br><br>HRESULT OnTxCharFormatChange(const CHARFORMAT * pcf);<br>HRESULT OnTxParaFormatChange(const PARAFORMAT * ppf);<br>HRESULT TxActivate(LONG * plOldState);<br>HRESULT TxGetPasswordChar(TCHAR * pch);<br>HRESULT TxGetParaFormat(const PARAFORMAT * * ppPF);<br>HRESULT TxGetMaxLength(DWORD * pLength);<br>BOOL TxClientToScreen(LPPOINT lppt);<br>BOOL TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight);<br>HRESULT TxDeactivate(LONG lNewState);<br>BOOL TxEnableScrollBar(INT fuSBFlags, INT fuArrowflags);<br>HRESULT TxGetAcceleratorPos(LONG * pcp);<br>HRESULT TxGetBackStyle(TXTBACKSTYLE * pstyle);<br>HRESULT TxGetCharFormat(const CHARFORMAT * * ppCF);<br>HRESULT TxGetClientRect(LPRECT prc);<br>HDC TxGetDC(VOID);<br>HRESULT TxGetExtent(LPSIZEL lpExtent);<br>HRESULT TxGetPropertyBits(DWORD dwMask, DWORD * pdwBits);<br>HRESULT TxGetScrollBars(DWORD * pdwScrollBar);<br>HRESULT TxGetSelectionBarWidth(LONG * lSelBarWidth);<br>COLORREF TxGetSysColor(INT nIndex);<br>HRESULT TxGetViewInset(LPRECT prc);<br>HIMC TxImmGetContext(VOID);<br>VOID TxImmReleaseContext(HIMC HIMC);<br>VOID TxInvalidateRect(LPCRECT prc, BOOL fMode);<br>VOID TxKillTimer(UINT idTimer);<br>HRESULT TxNotify(DWORD iNotify, VOID * pv);<br>INT TxReleaseDC(HDC HDC);<br>BOOL TxScreenToClient(LPPOINT lppt);<br>VOID TxScrollWindowEx(INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll);<br>VOID TxSetCapture(BOOL fCapture);<br>BOOL TxSetCaretPos(INT x, INT y);<br>VOID TxSetCursor(HCURSOR hcur, BOOL fText);<br>VOID TxSetFocus(VOID);<br>BOOL TxSetScrollPos(INT fnBar, INT nPos, BOOL fRedraw);<br>BOOL TxSetScrollRange(INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw);<br>BOOL TxSetTimer(UINT idTimer, UINT uTimeout);<br>BOOL TxShowCaret(BOOL fShow);<br>BOOL TxShowScrollBar(INT fnBar, BOOL fShow);<br>VOID TxViewChange(BOOL fUpdate);
 
用软件转的不知道行不行<br>unit TEXTSERV;<br>{**************************************************************************}<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{ &nbsp; &nbsp;This C DLL header file first (automatic) conversion generated by: &nbsp; &nbsp; }<br>{ &nbsp; &nbsp;HeadConv 4.0 (c) 2000 by Bob Swart (aka Dr.Bob - www.drbob42.com) &nbsp; &nbsp; }<br>{ &nbsp; &nbsp; &nbsp;Final Delphi-Jedi (Darth) command-line units edition &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{ &nbsp; &nbsp;Generated Date: 2005-12-20 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{ &nbsp; &nbsp;Generated Time: 10:48:08 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>{**************************************************************************}<br><br>interface<br>uses<br>{$IFDEF WIN32}<br> &nbsp;Windows;<br>{$ELSE}<br> &nbsp;Wintypes, WinProcs;<br>{$ENDIF}<br><br><br>{=&gt; f:/1/3/3.23/headconv/TEXTSERV.H &lt;=}<br><br>var<br> &nbsp;OnTxCharFormatChange: function(const pcf: PCHARFORMAT): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;OnTxParaFormatChange: function(const ppf: PPARAFORMAT): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxActivate: function(var plOldState: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetPasswordChar: function(var pch: TCHAR): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetParaFormat: function(const ppPF: PPARAFORMAT*): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetMaxLength: function(var pLength: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxClientToScreen: function(var lppt: POINT): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxCreateCaret: function(hbmp: HBITMAP; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xWidth: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;yHeight: Integer): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxDeactivate: function(lNewState: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxEnableScrollBar: function(fuSBFlags: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fuArrowflags: Integer): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetAcceleratorPos: function(var pcp: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetBackStyle: function(var pstyle: TXTBACKSTYLE): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetCharFormat: function(const ppCF: PCHARFORMAT*): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetClientRect: function(var prc: RECT): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetDC: function: HDC cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetExtent: function(var lpExtent: SIZEL): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetPropertyBits: function(dwMask: LongInt; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var pdwBits: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetScrollBars: function(var pdwScrollBar: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetSelectionBarWidth: function(var lSelBarWidth: LongInt): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetSysColor: function(nIndex: Integer): TColorRef cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxGetViewInset: function(var prc: RECT): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxImmGetContext: function: HIMC cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxImmReleaseContext: procedure(HIMC: HIMC) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxInvalidateRect: procedure(var prc: CRECT; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fMode: Bool) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxKillTimer: procedure(idTimer: Word) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxNotify: function(iNotify: LongInt; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pv: Pointer): HRESULT cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxReleaseDC: function(HDC: HDC): Integer cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxScreenToClient: function(var lppt: POINT): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxScrollWindowEx: procedure(dx: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dy: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var lprcScroll: CRECT; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var lprcClip: CRECT; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hrgnUpdate: HRGN; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var lprcUpdate: RECT; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fuScroll: Word) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetCapture: procedure(fCapture: Bool) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetCaretPos: function(x: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;y: Integer): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetCursor: procedure(hcur: HCURSOR; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fText: Bool) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetFocus: procedure cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetScrollPos: function(fnBar: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nPos: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fRedraw: Bool): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetScrollRange: function(fnBar: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nMinPos: LongInt; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nMaxPos: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fRedraw: Bool): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxSetTimer: function(idTimer: Word; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uTimeout: Word): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxShowCaret: function(fShow: Bool): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxShowScrollBar: function(fnBar: Integer; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fShow: Bool): Bool cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br>var<br> &nbsp;TxViewChange: procedure(fUpdate: Bool) cdecl &nbsp;{$IFDEF WIN32} stdcall {$ENDIF}; <br><br><br>var<br> &nbsp;DLLLoaded: Boolean { is DLL (dynamically) loaded already? }<br> &nbsp; &nbsp;{$IFDEF WIN32} = False; {$ENDIF}<br><br>implementation<br><br>var<br> &nbsp;SaveExit: pointer;<br> &nbsp;DLLHandle: THandle;<br>{$IFNDEF MSDOS}<br> &nbsp;ErrorMode: Integer;<br>{$ENDIF}<br><br> &nbsp;procedure NewExit; far;<br> &nbsp;begin<br> &nbsp; &nbsp;ExitProc := SaveExit;<br> &nbsp; &nbsp;FreeLibrary(DLLHandle)<br> &nbsp;end {NewExit};<br><br>procedure LoadDLL;<br>begin<br> &nbsp;if DLLLoaded then Exit;<br>{$IFNDEF MSDOS}<br> &nbsp;ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});<br>{$ENDIF}<br> &nbsp;DLLHandle := LoadLibrary('TEXTSERV.DLL');<br> &nbsp;if DLLHandle &gt;= 32 then<br> &nbsp;begin<br> &nbsp; &nbsp;DLLLoaded := True;<br> &nbsp; &nbsp;SaveExit := ExitProc;<br> &nbsp; &nbsp;ExitProc := @NewExit;<br> &nbsp; &nbsp;@OnTxCharFormatChange := GetProcAddress(DLLHandle,'OnTxCharFormatChange');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@OnTxCharFormatChange &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@OnTxParaFormatChange := GetProcAddress(DLLHandle,'OnTxParaFormatChange');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@OnTxParaFormatChange &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxActivate := GetProcAddress(DLLHandle,'TxActivate');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxActivate &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetPasswordChar := GetProcAddress(DLLHandle,'TxGetPasswordChar');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetPasswordChar &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetParaFormat := GetProcAddress(DLLHandle,'TxGetParaFormat');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetParaFormat &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetMaxLength := GetProcAddress(DLLHandle,'TxGetMaxLength');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetMaxLength &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxClientToScreen := GetProcAddress(DLLHandle,'TxClientToScreen');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxClientToScreen &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxCreateCaret := GetProcAddress(DLLHandle,'TxCreateCaret');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxCreateCaret &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxDeactivate := GetProcAddress(DLLHandle,'TxDeactivate');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxDeactivate &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxEnableScrollBar := GetProcAddress(DLLHandle,'TxEnableScrollBar');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxEnableScrollBar &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetAcceleratorPos := GetProcAddress(DLLHandle,'TxGetAcceleratorPos');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetAcceleratorPos &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetBackStyle := GetProcAddress(DLLHandle,'TxGetBackStyle');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetBackStyle &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetCharFormat := GetProcAddress(DLLHandle,'TxGetCharFormat');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetCharFormat &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetClientRect := GetProcAddress(DLLHandle,'TxGetClientRect');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetClientRect &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetDC := GetProcAddress(DLLHandle,'TxGetDC');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetDC &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetExtent := GetProcAddress(DLLHandle,'TxGetExtent');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetExtent &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetPropertyBits := GetProcAddress(DLLHandle,'TxGetPropertyBits');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetPropertyBits &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetScrollBars := GetProcAddress(DLLHandle,'TxGetScrollBars');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetScrollBars &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetSelectionBarWidth := GetProcAddress(DLLHandle,'TxGetSelectionBarWidth');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetSelectionBarWidth &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetSysColor := GetProcAddress(DLLHandle,'TxGetSysColor');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetSysColor &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxGetViewInset := GetProcAddress(DLLHandle,'TxGetViewInset');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxGetViewInset &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxImmGetContext := GetProcAddress(DLLHandle,'TxImmGetContext');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxImmGetContext &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxImmReleaseContext := GetProcAddress(DLLHandle,'TxImmReleaseContext');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxImmReleaseContext &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxInvalidateRect := GetProcAddress(DLLHandle,'TxInvalidateRect');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxInvalidateRect &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxKillTimer := GetProcAddress(DLLHandle,'TxKillTimer');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxKillTimer &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxNotify := GetProcAddress(DLLHandle,'TxNotify');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxNotify &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxReleaseDC := GetProcAddress(DLLHandle,'TxReleaseDC');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxReleaseDC &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxScreenToClient := GetProcAddress(DLLHandle,'TxScreenToClient');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxScreenToClient &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxScrollWindowEx := GetProcAddress(DLLHandle,'TxScrollWindowEx');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxScrollWindowEx &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetCapture := GetProcAddress(DLLHandle,'TxSetCapture');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetCapture &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetCaretPos := GetProcAddress(DLLHandle,'TxSetCaretPos');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetCaretPos &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetCursor := GetProcAddress(DLLHandle,'TxSetCursor');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetCursor &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetFocus := GetProcAddress(DLLHandle,'TxSetFocus');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetFocus &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetScrollPos := GetProcAddress(DLLHandle,'TxSetScrollPos');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetScrollPos &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetScrollRange := GetProcAddress(DLLHandle,'TxSetScrollRange');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetScrollRange &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxSetTimer := GetProcAddress(DLLHandle,'TxSetTimer');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxSetTimer &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxShowCaret := GetProcAddress(DLLHandle,'TxShowCaret');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxShowCaret &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxShowScrollBar := GetProcAddress(DLLHandle,'TxShowScrollBar');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxShowScrollBar &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp; &nbsp;@TxViewChange := GetProcAddress(DLLHandle,'TxViewChange');<br> &nbsp;{$IFDEF WIN32}<br> &nbsp; &nbsp;Assert(@TxViewChange &lt;&gt; nil);<br> &nbsp;{$ENDIF}<br> &nbsp;end<br> &nbsp;else<br> &nbsp;begin<br> &nbsp; &nbsp;DLLLoaded := False;<br> &nbsp; &nbsp;{ Error: TEXTSERV.DLL could not be loaded !! }<br> &nbsp;end;<br>{$IFNDEF MSDOS}<br> &nbsp;SetErrorMode(ErrorMode)<br>{$ENDIF}<br>end {LoadDLL};<br><br>begin<br> &nbsp;LoadDLL;<br>end.
 
谢谢了,我试一下。
 
后退
顶部