From: Travis on
Hi

I'm trying to add spell checking to my application. I downloaded and
installed the WSpell ActiveX control but I'm having trouble getting
started. The following is my code so far:

(I have added the WSpell OLE control to my window)

METHOD pshCheckSpelling( ) CLASS MyWindow
SELF:oDCOCX_WSPELL1:CreateEmbedding("WSPELL.WSpellCtrl.3", "{245338C3-
BCA3-4A2C-A7B7-53345999A8E8}")
SELF:oDCOCX_WSPELL1:InitAutoObject()

//SELF:oDCOCX_WSPELL1:TextControlHWnd := SELF:oDCmleTest:Handle() //
this gives me an error

SELF:oDCOCX_WSPELL1:Text := SELF:oDCmleTest:TextValue

SELF:oDCOCX_WSPELL1:ShowDialog := TRUE
SELF:oDCOCX_WSPELL1:ShowContext := TRUE
SELF:oDCOCX_WSPELL1:Start()

If I try to assign the MLE handle to TextControlHWnd then I get an
error (Error Code: Error converting VO argument to OLE variant).
Assigning the MLE TextValue to WSpell's Text property doesn't give me
an error but the WSpell dialog flashes to screen then instantly closes
even though there is definitely spelling mistakes in the MLE.

Has anyone got any code to get me started? I don't have much
experience with adding ActiveX controls to VO applications.

Thanks

Travis
From: Carlos Rocha on
Travis,

First, you shouldn't post the licence key in a public forum. I guess
there's no way to delete it now.

I don't know WSpell, but TextControlHWnd should expect a long. Try

WSPELL1:TextControlHWnd := long(_cast, SELF:oDCmleTest:Handle())


--
Carlos Rocha
From: Travis on
Thanks Carlos, that got rid of my error.

Now I just have the issue where the spell checker dialog flashes
momentarily to screen.

By the way, that is the registry key - not the license key that was
used to install the product.