DLL demo limitations

DLL Edition of the F-IN-BOX
tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

DLL demo limitations

Postby tomb » Tue Jan 01, 2008 11:58 pm

Hi all,

I am testing the demo version of the f_in_box dll and have found that I cannot enter text into the swf editable text fields when I load my flash .swf into f_in_box while it appears to work fine if I open the movie in Flash Player 9 - (note that the backspace key function works OK - deleting characters from the strings is fine - I just can't seem to add any as i would expect).

I've also noticed that when I register more than 1 event listener, as the following code shows - only the last one added seems to be called rather than all of the functions (TestCallFromFlash1() - TestCallFromFlash3())in turn as I would have expected -

FPCSetEventListener(m_hwndFlashPlayerControl, TestCallFromFlash1, 0);
FPCSetEventListener(m_hwndFlashPlayerControl, TestCallFromFlash2, 0);
FPCSetEventListener(m_hwndFlashPlayerControl, TestCallFromFlash3, 0);

My question to the above two issues is - is this expected with the demo version of the dll - ie reduced functionality or demo limitations, two different bugs - or possibly my not using the dll properly?

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

have tried 'FPCS_NEED_ALL_KEYS' style but still fails

Postby tomb » Wed Jan 02, 2008 5:28 am

Hi again,

I've tried adding the FPCS_NEED_ALL_KEYS style to the window style as discovered in the Sample07_ExternalInterface MFC project and tried the CreateWindow function as well as the FPC_CreateWindow function. In both cases the window loaded the swf file but still no joy with text input - The sample 07 project does allow the user to input text when I compile and run it - just not mine :-( There is no reference to FPCS_NEED_ALL_KEYS in the help files.

Any input would be great!
thanks
Tom Burghardt

m_hwndFlashPlayerControl =

FPC_CreateWindow( hFPC,
0,
(LPCWSTR) wss.str().c_str(),
WS_OVERLAPPEDWINDOW | FPCS_NEED_ALL_KEYS,
nLeft,
nTop,
nWidth,
nHeight,
NULL,
NULL,
hInstance,
NULL);


Also tried the following...
CreateWindow((LPCTSTR)FPC_GetClassAtom(hFPC),
(LPCWSTR) ss.str().c_str(),
WS_OVERLAPPEDWINDOW | FPCS_NEED_ALL_KEYS,
nLeft,
nTop,
nWidth,
nHeight,
NULL,
NULL,
hInstance,
NULL);

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

Re: DLL demo limitations

Postby Softanics » Wed Jan 02, 2008 12:25 pm

Thank you for your questions.

tomb wrote:I've also noticed that when I register more than 1 event listener, as the following code shows - only the last one added seems to be called rather than all of the functions (TestCallFromFlash1() - TestCallFromFlash3())in turn as I would have expected


Right, FPCSetEventListener sets a handler and only last handler is actual.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

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

Re: have tried 'FPCS_NEED_ALL_KEYS' style but still fails

Postby Softanics » Wed Jan 02, 2008 12:27 pm

tomb wrote:I've tried adding the FPCS_NEED_ALL_KEYS style to the window style as discovered in the Sample07_ExternalInterface MFC project and tried the CreateWindow function as well as the FPC_CreateWindow function. In both cases the window loaded the swf file but still no joy with text input - The sample 07 project does allow the user to input text when I compile and run it - just not mine :-( There is no reference to FPCS_NEED_ALL_KEYS in the help files.

m_hwndFlashPlayerControl =

FPC_CreateWindow( hFPC,
0,
(LPCWSTR) wss.str().c_str(),
WS_OVERLAPPEDWINDOW | FPCS_NEED_ALL_KEYS,
nLeft,
nTop,
nWidth,
nHeight,
NULL,
NULL,
hInstance,
NULL);


Also tried the following...
CreateWindow((LPCTSTR)FPC_GetClassAtom(hFPC),
(LPCWSTR) ss.str().c_str(),
WS_OVERLAPPEDWINDOW | FPCS_NEED_ALL_KEYS,
nLeft,
nTop,
nWidth,
nHeight,
NULL,
NULL,
hInstance,
NULL);


So you create a separate window, right? What if you create a parent window and a f-in-box window as a child window inside it?
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

Postby tomb » Wed Jan 02, 2008 10:06 pm

Hi Artam,

Yes I created a new window in the code i posted previously, I'm now using the following

m_hwndFlashPlayerControl =


FPC_CreateWindow(hFPC,
NULL,
(LPCWSTR) ss.str().c_str(),
WS_CHILD | WS_POPUP | WS_OVERLAPPEDWINDOW | FPCS_NEED_ALL_KEYS,// | FPCS_TRANSPARENT,
nLeft,
nTop,
nWidth,
nHeight,
hParent,
NULL,
hInstance,
NULL);

so I have made the f_in_box a child of the parent Window - once again, the swf file textfields are accepting focus with a user mouse click, the characters from the existing string in the editable textfield can be deleted using the delete-key and the back-space key -(also enter-key, home and end keys are OK too) so key strokes seem to be registered - just not characters - I am using Unicode settings in my project - not sure if this might be affecting things.

Thanks for your help
regards
Tom

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

Postby Softanics » Thu Jan 03, 2008 3:54 pm

Could you please send me your movie to support (at) f-in-box.com ?

BTW you can't use WS_POPUP and WS_CHILD at the same time.

Just send me your movie and I'll prepare an example.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

Postby tomb » Mon Jan 07, 2008 11:15 am

Hi Artem,

Thanks for taking a look at this - will email you the .swf asap if that is what you mean by sending you the 'movie'?

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

Postby Softanics » Mon Jan 07, 2008 4:56 pm

tomb wrote:Hi Artem,

Thanks for taking a look at this - will email you the .swf asap if that is what you mean by sending you the 'movie'?


Yes, that is what I mean, you are right. Thank you!
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

thanks have emailed you the movie

Postby tomb » Sun Jan 13, 2008 2:36 am

Thanks Artem, I've emailed you the movie as requested.

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

Postby Softanics » Mon Jan 14, 2008 6:14 pm

I've received an interesting result.

When I load a movie created in Flex and play it, I see the strange behavior: the count of GDI objects keeps increasing. Also there is a problem with a typing: I can set focus, I can enter a text, but I don't see a cursor.

But when I remove this line:

Code: Select all

FPC_Play(m_hwndFlashPlayerControl);


it solves all the problems!
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

Postby tomb » Tue Jan 15, 2008 4:57 am

Hi Artem,

Thanks again for looking at this.

Unfortunately, the code example you emailed me did not work, I was not using a .swf created in flex, just a simple text area created in Flash. Sadly, once again - i could not enter text even though i could select it, delete it, backspace over it, newline on 'enter' key, everything but actually enter text :( .

I did not get the GDI objects as I had not been calling the FPC_Play command when loading the flex .swf, it worked fine except i could not enter text again.

how does the FPCS_NEED_ALL_KEYS style work in FPC_CreateWindow? are you calling a flash player parameter inside FPC_CreateWindow? is it used to include character keystrokes?

regards
Tom

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

Postby Softanics » Tue Jan 15, 2008 11:53 am

I've just emailed you, please check.

The FPCS_NEED_ALL_KEYS style is used to allow an f-in-box window to handle ENTER, TAB keys. Even if FPCS_NEED_ALL_KEYS is not specified, an f-in-box window handles usual keys: 'A', 'B' etc. well.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

tomb
Posts: 7
Joined: Tue Jan 01, 2008 11:41 pm

Still not working

Postby tomb » Wed Jan 16, 2008 11:18 pm

Hi Artem,

Thanks for the demo program you sent me using my sample .swf files. Yes I can see that your sample does indeed work with my swf files and the CreateWindow function is the same that I am doing but my program continues to fail at entering text characters.

I am not sure what the difference is except that I am not using MFC directly but the SDL graphics library that creates the parent window for me - I do not have control of that. However SDL does not support multiple resizable windows. We do not have time to change all of the game to flex/AIR/flash so we keep the SDL created window to supply part of the game logic and have this base SDL window create the popup windows for the flash display using f-in-box.

I thought that SDL might have created a strange parent window with some form of style that was interfering with the keystroke events. However, in the flash code I have added a listener to the textarea which is triggered on keydown events - and these events are being generated as expected. I can get the value of the character - 'A', 'B' etc and add them to the end of the textarea - in this way I can fake keyboard input - characters are displayed but the cursor does not change location so if a user places the cursor in the middle of a sentence and types, the characters appear at the end of the sentence - not where the user expects the characters to appear - all this is a hack I know - but I cannot seem to find a better solution -

I am not 100% sure it is SDL windows causing the problem but I cant think of anything else that would be different between your sample code and my code - the calls are identical - everything else works sweetly - just not the text input.

Anyway, thanks for trying to help Artem.

regards
Tom


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 155 guests