Help with Mouse/Keyboard to Flash Window when in Direct3d

DLL Edition of the F-IN-BOX
Jim W.
Posts: 14
Joined: Fri Feb 03, 2006 7:20 pm
Location: Atlanta, GA, USA
Contact:

Help with Mouse/Keyboard to Flash Window when in Direct3d

Postby Jim W. » Mon Feb 20, 2006 12:39 pm

We're using FlashPlayerControl to put flash in a Direct3d world. So far things are working, but I'm having problems getting keystrokes and mouse messages to the flash app. Any ideas? I get the mouse and keyboard in the app (WM_LBUTTON*, WM_MOUSEMOVE WM_KEYUP, WM_KEYDOWN) forward them to the hidden window, (I'm using your example), but I get erratic results. The coordinate are being translated correctly.

About 50% of the mouse clicks work, and none of the keys work. I looked at the FPC code and see you're doing quite a bit of stuff with message maps. I commented out some areas that had to do with focus, but that didn't help. Could you update your DirectX sample to pass in a click and key strokes? That would be great. Using Spy++, I see the messages getting to the hidden window, but nothing happens, as if the FlashPlayerControl window is eating them.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Help with Mouse/Keyboard to Flash Window when in Direct3

Postby Softanics » Mon Feb 20, 2006 4:09 pm

Thank you for your question.
I haven't example but I think you should try to use IOleInPlaceObjectWindowless::OnWindowMessage. Get a pointer to IOleInPlaceObjectWindowless using the message FPCM_QUERYINTERFACE.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Jim W.
Posts: 14
Joined: Fri Feb 03, 2006 7:20 pm
Location: Atlanta, GA, USA
Contact:

Postby Jim W. » Fri Feb 24, 2006 7:19 pm

I did this and it works just as poorly, with only some clicks and no keyboard getting through

SFPCQueryInterface FPCQueryInterface;
FPCQueryInterface.pvObject = NULL;
FPCQueryInterface.iid = __uuidof(IOleInPlaceObjectWindowless);
::SendMessage(m_hwndFlashPlayerControl, FPCM_QUERYINTERFACE, 0, (LPARAM)&FPCQueryInterface);

VERIFY( FPCQueryInterface.pvObject != NULL );

pWindowless.Attach((IOleInPlaceObjectWindowless*)FPCQueryInterface.pvObject);

...

HRESULT result;
HRESULT hr = pWindowless->OnWindowMessage( msgId, wp, lp, &result );
ASSERT( SUCCEEDED( hr ) );

Any ideas?


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 11 guests