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?)
Thank you for the solution!
BTW: For any other PB developers needing to "snoop" around the O/S for various instantiated class internals .. please use my free WinExplorer PB App. It can locate anything in the O/S (and even kill it - LOL).. The App is built from my STD Framework ...
FYI: http://chrispollach.blogspot.com/2020/08/explorer.html
HTH
Regards ... Chris