Please tell me why the following code works on Win2K Server but not in Win9x.

I use the same version of Richtx32.ocx, riched32.dll and riched20.dll.


public Type CHARFORMAT2
.....
.....
End Type

dim charf as CHARFORMAT2
......
charf.cbSize = LenB(charf)
charf.dwMask = CFM_BACKCOLOR
charf.crBackColor = nColor

ret = SendMessageLong(rtfText1.hwnd, EM_SETCHARFORMAT, SCF_SELECTION, VarPtr(charf))
.....