Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:35 AM UTC

Uniface 9: [SOLVED] Looking to for a good spell checker dll to call from a Uniface App

[SOLVED] Looking to for a good spell checker dll to call from a Uniface App

Author: glen.marsh@noris.org (normars)

Hi,   I'm looking for a good spell checker to call from our Uniface applications.  Does anyone have some experience with this and could recommend one or a few to look at?  We are using Uniface 9.3.02.  - GlenCool

11 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:35 AM UTC

[SOLVED] Looking to for a good spell checker dll to call from a Uniface App

Author: glen.marsh@noris.org (normars)

Hi,   I'm looking for a good spell checker to call from our Uniface applications.  Does anyone have some experience with this and could recommend one or a few to look at?  We are using Uniface 9.3.02.  - GlenCool

normars said       It works great most of the time.  It's only occasionally that the spell check window is hidden behind the uniface app.  Any suggestions or direction would be appreciated.

It seems that this problem also can be seen outside of Uniface (e.g. see here). I can replicate the problem consistently when either the Uniface Debugger is active or a Message Box (e.g. message/info) is shown before calling the CheckSpelling method of Word. One trick that seems to work is to make the Uniface application window the parent window of the Word application window. You can do this by calling the Windows User32 function SetParent() and pass as child window handle the window handle of the Word application and as new parent window the window handle you get by calling the Uniface YRTL function ugethwnd().

variables ; ...    handle hUser32, hYrtl endvariables ; ... ; Get the window handle of Word hndWordApplication -> GET_ACTIVEWINDOW ( hndWordWindow ) hndWordWindow -> GET_HWND ( hWndWord ) ; Now we set the parent window of Word to the Uniface application window ; For this we use two C Call-out signatures ; 1. YRTL (DLL name yrtl.dll) with an operation that calls the function ugethwnd() ; 2. USER32 (DLL name user32.dll) with an operation that calls the function SetParent() newinstance "USER32", hUser32 newinstance "YRTL", hYrtl if (hUser32->SetParent(hWndWord, hYrtl->ugethwnd()) = 0)     message/error "Could not set parent window of Word to Uniface application window!" endif ; And now we call the CheckSpelling method hndWordDocument-> CHECKSPELLING ( -, -, -, -, -, -, -, -, -, -, -, - ) ; ...

Hope this helps. Best regards, Daniel


Author: diseli (daniel.iseli@uniface.com)