LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: Richtext and the api?

Richtext and the api? (by Normunds Kalnberzins, 03/09/2004 02:08:09 PM)

I don't know how you get 32 bytes. It looks that that's the length you write to the item.

For one thing you need to have

TabArray (MAXTABS-1) As Integer

On the other hand the real length of CDPABDEFINITION can be different. In R5 it got some additional elements (relative margins). In any case you need to set Header.Length to whatever value you use. So in fact you may write incorrect structure, but as far Header.Length is set to the real value Notes will accept it as a valid rich text (and will allow you to save it). Of course, when the Notes client tries to read it will probably crash on incorrect data though.

So there are two sides -- to write correct structures and to set at least record length so that it matches whatever data you are writting.

I think "$Fonts" sample have some rudimentar  code that writes CD records. It does not fill CDPABDEFINITION, CDPABREFERENCE, etc. you normally write out, but the idea is the same as writting the code in C. There are a number of samples in C API Toolkit that writes rich text. Only real thing in LotusScript is to make sure that structures in LS match structures in C.