Hello,
Perhaps have you more idea than me.
The source code show no errors,no bug but works only with windbg and
with the flags debug (Zi,/DEBUG).
Open it with windbg and you will see.
There is only two modifies to made at this source.
use this:
IID_ITextServices GUID <8d33f740h,0cf58h,11ceh,<0a8h,9dh,00h,0aah,00h,6ch,0adh,0c5h>>
The source use the one in uuid.lib with EXTERNDEF,after a search it isn't in this lib.
The DrawText function must be change by DrawTextEx just adding a NULL parameter.
invoke DrawTextEx,hdc,addr asciihello, LENGTHOF asciihello -1,addr rect,DT_CENTER,NULL
I have not searched for why the function don't work
There is no need of the InvalidateRect function if you made the init in the WM-CREATE Message.He is needed if you use the WM_COMMAND.Put it just before
invoke put_RTFText,bstrRTF
Also add this:
.ELSEIF uMsg == WM_CLOSE ;return zero
;invoke MessageBox,NULL,SADR(" WM_CLOSE "),SADR("Titre"),MB_OK
.if ppvITextServices != 0
ITextServUnk Release
.endif
.if ppvITextDocument != 0
ITextDocument Release
.endif
.if m_editCookie.bstrText != 0
invoke HeapFree,Hheap,NULL,m_editCookie.bstrText
.endif
INVOKE DestroyWindow, hwnd
mov retour,0
Modifying the source take care of this:
The itextservice and ITextHost are not STANDARD COM.
They are in the textinclude.inc with the source code (see attachment here).
In the frame ecx = this and there is no This in the prototypes
The Implem_ItextHost.inc hold the implementation of ItextHost.He have all is needed in it ,constant,data,code .To reuse it just include it in your project and you have to write the lines using it ( the init and drawing operations).