- Barry Ellison
- PowerBuilder
- Thursday, 20 October 2022 12:30 PM UTC
Demo application from WinterTree for Sentry Spelling Checker uses ActiveX 15.0, and this code works to find a handle that's passed to their 'as you type' spell checker.
I'm trying to get it to work using the latest ActiveX 28.0 version in 2019 R3. Using WinSpy I determine my RTE has a classname of TX28 while the demo program has a class of TX15P.
<Snippet of demo code to get the RTE handle>
// Obtain the Windows handle of the actual RTE control.
// In PB, the actual RTE control is wrapped inside other objects
ulong llu_hWinRTE
alu_hWin = FindWindowEx(alu_hWin,0, "PBTxTextControl", 0)
if alu_hWin = 0 then return 0
alu_hWin = FindWindowEx(alu_hWin,0, "AfxOleControl42u", 0)
if alu_hWin = 0 then return 0
llu_hWinRTE = FindWindowEx(alu_hWin,0, "TX15P", 0)
if llu_hWinRTE <> 0 then return llu_hWinRTE
... checks for prior versions, too: TX14P, TX13P... TX11P
</snippet>
I added another check above 'TX15P' for 'TX28' but the 2nd FindWindowEx() calll w/'AfxOleControl42u' returns a 0 and exists with a value of 0. I also removed this check completely all the FindWindowEx() return 0.
I'm at a loss - any thoughts on how to drill down through these wrappers? (I suspect the AfxOleControl42u name has changed? How would one determine that?)
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.