' ########################################################################################
' Microsoft Windows
' File: TextServ.inc
' Contents: Define interfaces between the Text Services component and the host
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' NOTE: The ITextServices and ITextHost interfaces are unusable with PB direct interface
' support because they use C++ thiscall convention instead of stdcall. The thiscall convention
' is like stdcall except that the "this" parameter is passed in the ECX register instead of
' at the top of the stack. Therefore, the use of assembler is required.
#IF NOT %DEF(PBX_TextServ_PBI)
#DEFINE PBX_TextServ_PBI
%EQUATE `TEXTSERV_INC = 1
#INCLUDE ONCE "Legacy/UI/Richedit.inc"
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
'EXTERN_C const IID IID_ITextServices;
'EXTERN_C const IID IID_ITextHost;
$IID_ITextServices = GUID$("{8D33F740-CF58-11CE-A89D-00AA006CADC5}")
'$IID_ITextHost = GUID$("{C5BDD8D0-D26E-11CE-A89E-00AA006CADC5}")
' // Note: The above guid is incorrect. This one is the one really exported.
$IID_ITextHost = GUID$("{13E670F4-1A5A-11CE-ABEB-00AA00B65EA1}")
' // The following one is the IID for the undocumented ITextHost2 interface.
$IID_ITextHost2 = GUID$("{13E670F5-1A5A-11CE-ABEB-00AA00B65EA1}")
'// Note: error code is first outside of range reserved for OLE.
'#define S_MSG_KEY_IGNORED \
' MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x201)
%EQUATE `S_MSG_KEY_IGNORED = &H00040201
'// Enums used by property methods
'/*
' * TXTBACKSTYLE
' *
' * @enum Defines different background styles control
' */
' enum TXTBACKSTYLE
%EQUATE `TXTBACK_TRANSPARENT = 0 ' //@emem background should show through
%EQUATE `TXTBACK_OPAQUE = 1 ' //@emem erase background
'/*
' * TXTHITRESULT
' *
' * @enum Defines different hitresults
' */
' enum TXTHITRESULT
%EQUATE `TXTHITRESULT_NOHIT = 0 ' //@emem no hit
%EQUATE `TXTHITRESULT_TRANSPARENT = 1 ' //@emem point is within the text's rectangle, but
 ' //in a transparent region
%EQUATE `TXTHITRESULT_CLOSE = 2 ' //@emem point is close to the text
%EQUATE `TXTHITRESULT_HIT = 3 ' //@emem dead-on hit
'/*
' * TXTNATURALSIZE
' *
' * @enum useful values for TxGetNaturalSize.
' *
' * @xref <mf CTxtEdit::TxGetNaturalSize>
' */
' enum TXTNATURALSIZE
%EQUATE `TXTNS_FITTOCONTENT = 1 ' //@emem Get a size that fits the content
%EQUATE `TXTNS_ROUNDTOLINE = 2 ' //@emem Round to the nearest whole line.
'/*
' * TXTVIEW
' *
' * @enum useful values for TxDraw lViewId parameter
' *
' * @xref <mf CTxtEdit::TxDraw>
' */
' enum TXTVIEW
%EQUATE `TXTVIEW_ACTIVE = 0
%EQUATE `TXTVIEW_INACTIVE = -1
'/*
' * CHANGETYPE
' *
' * @enum used for CHANGENOTIFY.dwChangeType; indicates what happened
' * for a particular change.
' */
' enum CHANGETYPE
%EQUATE `CN_GENERIC = 0 ' //@emem Nothing special happened
%EQUATE `CN_TEXTCHANGED = 1 ' //@emem the text changed
%EQUATE `CN_NEWUNDO = 2 ' //@emem A new undo action was added
%EQUATE `CN_NEWREDO = 4 ' //@emem A new redo action was added
'/*
' * @struct CHANGENOTIFY |
' *
' * passed during an EN_CHANGE notification; contains information about
' * what actually happened for a change.
' */
' // Size = 8 bytes
TYPE CHANGENOTIFY DWORD
 dwChangeType AS DWORD ' DWORD //@field TEXT changed, etc
 pvCookieData AS DWORD ' void * //@field cookie for the undo action
 ' // associated with the change.
END TYPE
'// The TxGetPropertyBits and OnTxPropertyBitsChange methods can pass the following bits:
'// NB!!! Do NOT rely on the ordering of these bits yet; the are subject
'// to change.
%EQUATE `TXTBIT_RICHTEXT = 1 ' // rich-text control
%EQUATE `TXTBIT_MULTILINE = 2 ' // single vs multi-line control
%EQUATE `TXTBIT_READONLY = 4 ' // read only text
%EQUATE `TXTBIT_SHOWACCELERATOR = 8 ' // underline accelerator character
%EQUATE `TXTBIT_USEPASSWORD = &H10 ' // use password char to display text
%EQUATE `TXTBIT_HIDESELECTION = &H20 ' // show selection when inactive
%EQUATE `TXTBIT_SAVESELECTION = &H40 ' // remember selection when inactive
%EQUATE `TXTBIT_AUTOWORDSEL = &H80 ' // auto-word selection
%EQUATE `TXTBIT_VERTICAL = &H100 ' // vertical
%EQUATE `TXTBIT_SELBARCHANGE = &H200 ' // notification that the selection bar width
 ' // has changed.
 ' // FUTURE: move this bit to the end to
 ' // maintain the division between
 ' // properties and notifications.
%EQUATE `TXTBIT_WORDWRAP = &H400 ' // if set, then multi-line controls
 ' // should wrap words to fit the available
 ' // display
%EQUATE `TXTBIT_ALLOWBEEP = &H800 ' // enable/disable beeping
%EQUATE `TXTBIT_DISABLEDRAG = &H1000 ' // disable/enable dragging
%EQUATE `TXTBIT_VIEWINSETCHANGE = &H2000 ' // the inset changed
%EQUATE `TXTBIT_BACKSTYLECHANGE = &H4000
%EQUATE `TXTBIT_MAXLENGTHCHANGE = &H8000
%EQUATE `TXTBIT_SCROLLBARCHANGE = &H10000
%EQUATE `TXTBIT_CHARFORMATCHANGE = &H20000
%EQUATE `TXTBIT_PARAFORMATCHANGE = &H40000
%EQUATE `TXTBIT_EXTENTCHANGE = &H80000
%EQUATE `TXTBIT_CLIENTRECTCHANGE = &H100000 ' // the client rectangle changed
%EQUATE `TXTBIT_USECURRENTBKG = &H200000 ' // tells the renderer to use the current background
 ' // color rather than the system default for an entire line
'/*
' * ITextServices
' *
' * @class An interface extending Microsoft's Text Object Model to provide
' * extra functionality for windowless operation. In conjunction
' * with ITextHost, ITextServices provides the means by which the
' * the RichEdit control can be used *without* creating a window.
' *
' * @base public | IUnknown
' */
'class ITextServices : public IUnknown
'{
'public:
' //@cmember Generic Send Message interface
' virtual HRESULT TxSendMessage(
' UINT msg,
' WPARAM wparam,
' LPARAM lparam,
' LRESULT *plresult) = 0;
' //@cmember Rendering
' virtual HRESULT TxDraw(
' DWORD dwDrawAspect,
' LONG lindex,
' void * pvAspect,
' DVTARGETDEVICE * ptd,
' HDC hdcDraw,
' HDC hicTargetDev,
' LPCRECTL lprcBounds,
' LPCRECTL lprcWBounds,
' LPRECT lprcUpdate,
' BOOL (CALLBACK * pfnContinue) (DWORD),
' DWORD dwContinue,
' LONG lViewId) = 0;
' //@cmember Horizontal scrollbar support
' virtual HRESULT TxGetHScroll(
' LONG *plMin,
' LONG *plMax,
' LONG *plPos,
' LONG *plPage,
' BOOL * pfEnabled ) = 0;
' //@cmember Horizontal scrollbar support
' virtual HRESULT TxGetVScroll(
' LONG *plMin,
' LONG *plMax,
' LONG *plPos,
' LONG *plPage,
' BOOL * pfEnabled ) = 0;
' //@cmember Setcursor
' virtual HRESULT OnTxSetCursor(
' DWORD dwDrawAspect,
' LONG lindex,
' void * pvAspect,
' DVTARGETDEVICE * ptd,
' HDC hdcDraw,
' HDC hicTargetDev,
' LPCRECT lprcClient,
' INT x,
' INT y) = 0;
' //@cmember Hit-test
' virtual HRESULT TxQueryHitPoint(
' DWORD dwDrawAspect,
' LONG lindex,
' void * pvAspect,
' DVTARGETDEVICE * ptd,
' HDC hdcDraw,
' HDC hicTargetDev,
' LPCRECT lprcClient,
' INT x,
' INT y,
' DWORD * pHitResult) = 0;
' //@cmember Inplace activate notification
' virtual HRESULT OnTxInPlaceActivate(LPCRECT prcClient) = 0;
' //@cmember Inplace deactivate notification
' virtual HRESULT OnTxInPlaceDeactivate() = 0;
' //@cmember UI activate notification
' virtual HRESULT OnTxUIActivate() = 0;
' //@cmember UI deactivate notification
' virtual HRESULT OnTxUIDeactivate() = 0;
' //@cmember Get text in control
' virtual HRESULT TxGetText(BSTR *pbstrText) = 0;
' //@cmember Set text in control
' virtual HRESULT TxSetText(LPCWSTR pszText) = 0;
' //@cmember Get x position of
' virtual HRESULT TxGetCurTargetX(LONG *) = 0;
' //@cmember Get baseline position
' virtual HRESULT TxGetBaseLinePos(LONG *) = 0;
' //@cmember Get Size to fit / Natural size
' virtual HRESULT TxGetNaturalSize(
' DWORD dwAspect,
' HDC hdcDraw,
' HDC hicTargetDev,
' DVTARGETDEVICE *ptd,
' DWORD dwMode,
' const SIZEL *psizelExtent,
' LONG *pwidth,
' LONG *pheight) = 0;
' //@cmember Drag & drop
' virtual HRESULT TxGetDropTarget( IDropTarget **ppDropTarget ) = 0;
' //@cmember Bulk bit property change notifications
' virtual HRESULT OnTxPropertyBitsChange(DWORD dwMask, DWORD dwBits) = 0;
' //@cmember Fetch the cached drawing size
' virtual HRESULT TxGetCachedSize(DWORD *pdwWidth, DWORD *pdwHeight)=0;
'};
'INTERFACE ITextServices $IID_ITextServices
' INHERIT IUnknown
' ' =====================================================================================
' METHOD TxSendMessage ( ' VTable offset = 12
' BYVAL msg AS DWORD
' , BYVAL wparam AS DWORD
' , BYVAL lparam AS LONG
' , BYREF plresult AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxDraw ( ' VTable offset = 16
' BYVAL dwDrawAspect AS DWORD
' , BYVAL lindex AS LONG
' , BYVAL pvAspect AS DWORD
' , BYREF ptd AS DVTARGETDEVICE
' , BYVAL hdcDraw AS DWORD
' , BYVAL hicTargetDev AS DWORD
' , BYREF lprcBounds AS RECTL
' , BYREF lprcWBounds AS RECTL
' , BYREF lprcUpdate AS RECT
' , BYVAL pfnContinue AS DWORD
' , BYVAL dwContinue AS DWORD
' , BYVAL lViewId AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetHScroll ( ' VTable offset = 20
' BYREF plMin AS LONG
' , BYREF plMax AS LONG
' , BYREF plPos AS LONG
' , BYREF plPage AS LONG
' , BYREF pfEnabled AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetVScroll ( ' VTable offset = 24
' BYREF plMin AS LONG
' , BYREF plMax AS LONG
' , BYREF plPos AS LONG
' , BYREF plPage AS LONG
' , BYREF pfEnabled AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxSetCursor ( ' VTable offset = 28
' BYVAL dwDrawAspect AS DWORD
' , BYVAL lindex AS LONG
' , BYVAL pvAspect AS DWORD
' , BYREF DVTARGETDEVICE
' , BYVAL ptd AS DWORD
' , BYVAL hicTargetDev AS DWORD
' , BYREF lprcClient AS RECT
' , BYVAL x AS LONG
' , BYVAL y AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxQueryHitPoint ( ' VTable offset = 32
' BYVAL dwDrawAspect AS DWORD
' , BYVAL lindex AS LONG
' , BYVAL pvAspect AS DWORD
' , BYREF ptd AS DVTARGETDEVICE
' , BYVAL hdcDraw AS DWORD
' , BYVAL hicTargetDev AS DWORD
' , BYREF lprcClient AS RECT
' , BYVAL x AS LONG
' , BYVAL y AS LONG
' , BYREF pHitResult AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxInPlaceActivate ( ' VTable offset = 36
' BYREF prcClient AS RECT
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxInPlaceDeactivate ( ' VTable offset = 40
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxUIActivate ( ' VTable offset = 44
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxUIDeactivate ( ' VTable offset = 48
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetText ( ' VTable offset = 52
' BYREF pbstrText AS WSTRING
' ) AS LONG
' ' =====================================================================================
' METHOD TxSetText ( ' VTable offset = 56
' BYREF pszText AS WSTRINGZ
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetCurTargetX ( ' VTable offset = 60
' BYREF px AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetBaseLinePos ( ' VTable offset = 64
' BYREF pBaseLinePos AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetNaturalSize ( ' VTable offset = 68
' BYVAL dwAspect AS DWORD
' , BYVAL hdcDraw AS DWORD
' , BYVAL hicTargetDev AS DWORD
' , BYREF ptd AS DVTARGETDEVICE
' , BYVAL dwMode AS DWORD
' , BYREF psizelExtent AS SIZEL
' , BYREF pwidth AS LONG
' , BYREF pheight AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetDropTarget ( ' VTable offset = 72
' BYREF ppDropTarget AS IDropTarget
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxPropertyBitsChange ( ' VTable offset = 76
' BYVAL dwMask AS DWORD
' , BYVAL dwBits AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetCachedSize ( ' VTable offset = 80
' BYREF pdwWidth AS DWORD
' , BYREF pdwHeight AS DWORD
' ) AS LONG
' ' =====================================================================================
'END INTERFACE
'/*
' * ITextHost
' *
' * @class Interface to be used by text services to obtain text host services
' *
' * @base public | IUnknown
' */
'class ITextHost : public IUnknown
'{
'public:
' //@cmember Get the DC for the host
' virtual HDC TxGetDC() = 0;
' //@cmember Release the DC gotten from the host
' virtual INT TxReleaseDC(HDC hdc) = 0;
' //@cmember Show the scroll bar
' virtual BOOL TxShowScrollBar(INT fnBar, BOOL fShow) = 0;
' //@cmember Enable the scroll bar
' virtual BOOL TxEnableScrollBar (INT fuSBFlags, INT fuArrowflags) = 0;
' //@cmember Set the scroll range
' virtual BOOL TxSetScrollRange(
' INT fnBar,
' LONG nMinPos,
' INT nMaxPos,
' BOOL fRedraw) = 0;
' //@cmember Set the scroll position
' virtual BOOL TxSetScrollPos (INT fnBar, INT nPos, BOOL fRedraw) = 0;
' //@cmember InvalidateRect
' virtual void TxInvalidateRect(LPCRECT prc, BOOL fMode) = 0;
' //@cmember Send a WM_PAINT to the window
' virtual void TxViewChange(BOOL fUpdate) = 0;
' //@cmember Create the caret
' virtual BOOL TxCreateCaret(HBITMAP hbmp, INT xWidth, INT yHeight) = 0;
' //@cmember Show the caret
' virtual BOOL TxShowCaret(BOOL fShow) = 0;
' //@cmember Set the caret position
' virtual BOOL TxSetCaretPos(INT x, INT y) = 0;
' //@cmember Create a timer with the specified timeout
' virtual BOOL TxSetTimer(UINT idTimer, UINT uTimeout) = 0;
' //@cmember Destroy a timer
' virtual void TxKillTimer(UINT idTimer) = 0;
' //@cmember Scroll the content of the specified window's client area
' virtual void TxScrollWindowEx (
' INT dx,
' INT dy,
' LPCRECT lprcScroll,
' LPCRECT lprcClip,
' HRGN hrgnUpdate,
' LPRECT lprcUpdate,
' UINT fuScroll) = 0;
' //@cmember Get mouse capture
' virtual void TxSetCapture(BOOL fCapture) = 0;
' //@cmember Set the focus to the text window
' virtual void TxSetFocus() = 0;
' //@cmember Establish a new cursor shape
' virtual void TxSetCursor(HCURSOR hcur, BOOL fText) = 0;
' //@cmember Converts screen coordinates of a specified point to the client coordinates
' virtual BOOL TxScreenToClient (LPPOINT lppt) = 0;
' //@cmember Converts the client coordinates of a specified point to screen coordinates
' virtual BOOL TxClientToScreen (LPPOINT lppt) = 0;
' //@cmember Request host to activate text services
' virtual HRESULT TxActivate( LONG * plOldState ) = 0;
' //@cmember Request host to deactivate text services
' virtual HRESULT TxDeactivate( LONG lNewState ) = 0;
' //@cmember Retrieves the coordinates of a window's client area
' virtual HRESULT TxGetClientRect(LPRECT prc) = 0;
' //@cmember Get the view rectangle relative to the inset
' virtual HRESULT TxGetViewInset(LPRECT prc) = 0;
' //@cmember Get the default character format for the text
' virtual HRESULT TxGetCharFormat(const CHARFORMATW **ppCF ) = 0;
' //@cmember Get the default paragraph format for the text
' virtual HRESULT TxGetParaFormat(const PARAFORMAT **ppPF) = 0;
' //@cmember Get the background color for the window
' virtual COLORREF TxGetSysColor(int nIndex) = 0;
' //@cmember Get the background (either opaque or transparent)
' virtual HRESULT TxGetBackStyle(TXTBACKSTYLE *pstyle) = 0;
' //@cmember Get the maximum length for the text
' virtual HRESULT TxGetMaxLength(DWORD *plength) = 0;
' //@cmember Get the bits representing requested scroll bars for the window
' virtual HRESULT TxGetScrollBars(DWORD *pdwScrollBar) = 0;
' //@cmember Get the character to display for password input
' virtual HRESULT TxGetPasswordChar(TCHAR *pch) = 0;
' //@cmember Get the accelerator character
' virtual HRESULT TxGetAcceleratorPos(LONG *pcp) = 0;
' //@cmember Get the native size
' virtual HRESULT TxGetExtent(LPSIZEL lpExtent) = 0;
' //@cmember Notify host that default character format has changed
' virtual HRESULT OnTxCharFormatChange (const CHARFORMATW * pcf) = 0;
' //@cmember Notify host that default paragraph format has changed
' virtual HRESULT OnTxParaFormatChange (const PARAFORMAT * ppf) = 0;
' //@cmember Bulk access to bit properties
' virtual HRESULT TxGetPropertyBits(DWORD dwMask, DWORD *pdwBits) = 0;
' //@cmember Notify host of events
' virtual HRESULT TxNotify(DWORD iNotify, void *pv) = 0;
' // Far East Methods for getting the Input Context
'//#ifdef WIN95_IME
' virtual HIMC TxImmGetContext() = 0;
' virtual void TxImmReleaseContext( HIMC himc ) = 0;
'//#endif
' //@cmember Returns HIMETRIC size of the control bar.
' virtual HRESULT TxGetSelectionBarWidth (LONG *lSelBarWidth) = 0;
'};
'INTERFACE ITextHost $IID_ITextHost
' INHERIT IUnknown
' ' =====================================================================================
' METHOD TxGetDC ( ' VTable offset = 12
' ) AS DWORD ' HDC
' ' =====================================================================================
' METHOD TxReleaseDC ( ' VTable offset = 16
' BYVAL hdc AS DWORD
' ) AS LONG ' INT
' ' =====================================================================================
' METHOD TxShowScrollBar ( ' VTable offset = 20
' BYVAL fnBar AS LONG
' , BYVAL fShow AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxEnableScrollBar ( ' VTable offset = 24
' BYVAL fuSBFlags AS LONG
' , BYVAL fuArrowflags AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxSetScrollRange ( ' VTable offset = 28
' BYVAL fnBar AS LONG
' , BYVAL nMinPos AS LONG
' , BYVAL nMaxPos AS LONG
' , BYVAL fRedraw AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxSetScrollPos ( ' VTable offset = 32
' BYVAL fnBar AS LONG
' , BYVAL nPos AS LONG
' , BYVAL fRedraw AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxInvalidateRect ( ' VTable offset = 36
' BYREF prc AS RECT
' , BYVAL fMode AS LONG
' ) ' void
' ' =====================================================================================
' METHOD TxViewChange ( ' VTable offset = 40
' BYVAL fUpdate AS LONG
' ) ' void
' ' =====================================================================================
' METHOD TxCreateCaret ( ' VTable offset = 44
' BYVAL hbmp AS DWORD
' , BYVAL xWidth AS LONG
' , BYVAL yHeight AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxShowCaret ( ' VTable offset = 48
' BYVAL fShow AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxSetCaretPos ( ' VTable offset = 52
' BYVAL x AS LONG
' , BYVAL y AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxSetTimer ( ' VTable offset = 56
' BYVAL idTimer AS DWORD
' , BYVAL uTimeout AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxKillTimer ( ' VTable offset = 60
' BYVAL idTimer AS DWORD
' ) ' void
' ' =====================================================================================
' METHOD TxScrollWindowEx ( ' VTable offset = 64
' BYVAL dx AS LONG
' , BYVAL dy AS LONG
' , BYREF lprcScroll AS RECT
' , BYREF lprcClip AS RECT
' , BYVAL hrgnUpdate AS DWORD
' , BYREF lprcUpdate AS RECT
' , BYVAL fuScroll AS DWORD
' ) ' void
' ' =====================================================================================
' METHOD TxSetCapture ( ' VTable offset = 68
' BYVAL fCapture AS LONG
' ) ' void
' ' =====================================================================================
' METHOD TxSetFocus ( ' VTable offset = 72
' ) ' void
' ' =====================================================================================
' METHOD TxSetCursor ( ' VTable offset = 76
' BYVAL hcur AS DWORD
' , BYVAL fText AS LONG
' ) ' void
' ' =====================================================================================
' METHOD TxScreenToClient ( ' VTable offset = 80
' BYREF lppt AS POINT
' ) AS LONG
' ' =====================================================================================
' METHOD TxActivate ( ' VTable offset = 84
' BYREF plOldState AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxDeactivate ( ' VTable offset = 88
' BYVAL lNewState AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetClientRect ( ' VTable offset = 92
' BYREF prc AS RECT
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetViewInset ( ' VTable offset = 96
' BYREF prc AS RECT
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetCharFormat ( ' VTable offset = 100
' BYREF ppCF AS CHARFORMATW
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetParaFormat ( ' VTable offset = 104
' BYREF ppPF AS PARAFORMAT
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetSysColor ( ' VTable offset = 108
' BYVAL nIndex AS LONG
' ) AS DWORD ' COLORREF
' ' =====================================================================================
' METHOD TxGetBackStyle ( ' VTable offset = 112
' BYREF pstyle AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetMaxLength ( ' VTable offset = 116
' BYREF plength AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetScrollBars ( ' VTable offset = 120
' BYREF pdwScrollBar AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetPasswordChar ( ' VTable offset = 124
' BYREF pch AS WORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetAcceleratorPos ( ' VTable offset = 128
' BYREF pcp AS LONG
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetExtent ( ' VTable offset = 132
' BYREF lpExtent AS SIZEL
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxCharFormatChange ( ' VTable offset = 136
' BYREF pcf AS CHARFORMATW
' ) AS LONG
' ' =====================================================================================
' METHOD OnTxParaFormatChange ( ' VTable offset = 140
' BYREF ppf AS PARAFORMAT
' ) AS LONG
' ' =====================================================================================
' METHOD TxGetPropertyBits ( ' VTable offset = 144
' BYVAL dwMask AS DWORD
' , BYREF pdwBits AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxNotify ( ' VTable offset = 148
' BYVAL iNotify AS DWORD
' , BYVAL pv AS DWORD
' ) AS LONG
' ' =====================================================================================
' METHOD TxImmGetContext ( ' VTable offset = 152
' ) AS DWORD ' HIMC
' ' =====================================================================================
' METHOD TxImmReleaseContext ( ' VTable offset = 156
' BYVAL himc AS DWORD
' ) ' void
' ' =====================================================================================
' METHOD TxGetSelectionBarWidth ( ' VTable offset = 160
' BYREF lSelBarWidth AS LONG
' ) AS LONG
' ' =====================================================================================
'END INTERFACE
'//+-----------------------------------------------------------------------
'// Factories
'//------------------------------------------------------------------------
'// Text Services factory
'STDAPI CreateTextServices(
' IUnknown *punkOuter,
' ITextHost *pITextHost,
' IUnknown **ppUnk);
'DECLARE FUNCTION CreateTextServices LIB "msftedit.dll" ALIAS "CreateTextServices" ( ' BYVAL punkOuter AS IUnknown
' , BYVAL pITextHost AS ITextHost
' , BYREF ppUnk AS IUnknown
' ) AS LONG
'typedef HRESULT (STDAPICALLTYPE * PCreateTextServices)(
' IUnknown *punkOuter,
' ITextHost *pITextHost,
' IUnknown **ppUnk);
#ENDIF
