Hello Don,
<snip>
I've used Spy++ to analyze the windows created by the working OO ActiveX
control, and those created by my ActiveX control up to the moment that the
call hangs. Spy++ shows that my control creates the same child window of
window class SALTMPSUBFRAME that the OO control creates. Everything in the
Spy++ Window Properties looks the same except for the fact that the Window
Proc on the General tab shows as unavailable. I assume that this is an
indication that the window is still in limbo because the call hung. The OO
QuickStarter icon is unresponsive while the call is hung.
If I remember right there was similar problems on developing the ActiveX
control of OOo. And it was reasoned by some synchronous callbacks
related to the hWnd.
Please analyze the code of the ActiveX control, if you can find
something related to threads. I will ask the right developers here too
.. so I can provide some more details later. stay tuned
On the other side I know: providing the hWnd to OOo isnt enough ... not
on windows. The bean uses sub classing of the WindowProc to full fill
it's job. Otherwhise the office window isnt shown as child of your
window correctly. Especialy resizes are not handled by OOo for external
windows ... so you have to make sure that the OOo window is shown
full-size within your hWnd area.
The related code can be found on:
http://api.openoffice.org/source/browse/api/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c?rev=1.3&content-type=text/vnd.viewcvs-markup
http://api.openoffice.org/source/browse/api/bean/native/unix/...
The most interesting parts are:
JNIEXPORT jlong JNICALL
Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow
(JNIEnv * env, jobject obj_this)
{
...
/* Register own window procedure
Do it one times only! Otherwhise
multiple instances will be registered
and calls on such construct produce
a stack overflow.
*/
if (GetProp( hWnd, OLD_PROC_KEY )==0)
{
hFuncPtr =
SetWindowLong( hWnd, GWL_WNDPROC,
(DWORD)OpenOfficeWndProc );
SetProp( hWnd, OLD_PROC_KEY, (HANDLE)hFuncPtr );
}
...
}
static LRESULT APIENTRY OpenOfficeWndProc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
....
return CallWindowProc(GetProp(hWnd, OLD_PROC_KEY),
hWnd, uMsg, wParam, lParam);
}
You should handle the same events WM_PARENTNOTIFY and WM_SIZE for your
window.
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]