LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Rich Text Box

Previously i had some problems using Microsoft Rich Textbox Control 6.0 (SP4). I have solved this problem but i can't seem to be able to see any function help for this control.

Anyway, my concern is I want to save the contents in the rich text window in normal text format and not rich text. Is it possible? Currently, i'm using the below command which saves it in rich text format.

RichTextLib_IRichTextSaveFile (text, NULL, file, CA_DEFAULT_VAL);

I also need to see what other options there are besides "CA_DEFAULT_VAL" which is in the v flags field.

thanks.

cheers
AL
0 Kudos
Message 1 of 5
(3,186 Views)
Hello Al,

After opening up the documentation for the function, the V_FlAGS parameter (filetype) is a integer or constant that specifies the type of file loaded, as described in Settings.

In the Settings section, the two valid values for filetype are:
0 = (Default) RTF. The RichTextBox control saves its contents as an .rtf file.
1 = Text. The RichTextBox control saves its contents as a text file.

Hope that helps.
0 Kudos
Message 2 of 5
(3,172 Views)
Hi Wendy,

thanks, but that dosen't seem to work. That field is detected as a variant.

If i write something like this:

RichTextLib_IRichTextSaveFile (TextHandle, NULL, ScriptFile, 1);

an error occurs.

Error msg: Type error in argument 4 to 'RichTextLib_|RichTextSaveFile';found 'int' expected 'VARIANT'.

Please advice. Thanks

cheers
AL
0 Kudos
Message 3 of 5
(3,165 Views)
Hello Al,

You can try using the CA_VariantSetInt function to convert an integer to a variant.

Hope that helps.
Message 4 of 5
(3,160 Views)
Hi Wendy,

it works!! Thanks for the trouble.

Cheers
Ailvera
0 Kudos
Message 5 of 5
(3,156 Views)