Transparency

DLL Edition of the F-IN-BOX
chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Transparency

Postby chris1228 » Fri Feb 10, 2006 9:00 pm

I am trying to do a transparent window and I am having trouble. The background of the movie is NEVER transparent. It is always the color I set it too (e.g white, gray etc etc). I looked at the demo code and I am not seeing anything different than what I am doing. Has anyone gotten this to work like the DEMO? Please help this is getting frustrating.

I should add I am not using MFC. Here is my register window and create window code:

Code: Select all

bool AyaTaskbarNotifier::Register( HINSTANCE hInstance )
   {
      WNDCLASSEX  wcex;

      wcex.cbSize          = sizeof(WNDCLASSEX);
      wcex.style           = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
      wcex.lpfnWndProc     = TaskbarNotifierWndProc;
      wcex.cbClsExtra      = 0;
      wcex.cbWndExtra      = 0;
      wcex.hInstance       = hInstance;
      wcex.hCursor         = LoadCursor(NULL, IDC_ARROW);
      wcex.hbrBackground   = NULL;
      wcex.lpszMenuName    = 0;
      wcex.lpszClassName   = TEXT("ImvoxClient.TaskbarNotifier");
      wcex.hIcon           = 0;
      wcex.hIconSm         = 0;

      return RegisterClassEx(&wcex) != 0;
   }


Code: Select all

// Create our container window.
      hwndFlashPlayerControl =
        CreateWindowEx(WS_EX_LAYERED, /* Use style WS_EX_LAYERED! */
                       WC_FLASH,
                       NULL,
                       WS_POPUP | WS_VISIBLE, /* Use style WS_POPUP! */
                       rc.left,
                       rc.top,
                       rc.right - rc.left,
                       rc.bottom - rc.top,
                       NULL,
                       NULL,
                       NULL,
                       NULL);

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

Postby Softanics » Sat Feb 11, 2006 10:05 am

Thank you for your question.

Call FPCIsTransparentAvailable to detect if the transparent mode is available.
Did you call RegisterFlashWindowClass / RegisterFlashWindowClassEx before creating the window?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Mon Feb 13, 2006 2:27 pm

I have done both, FPCIsTransparentAvailable returns true and I call RegisterFlashWindowClass in the Main app. This is just a sub window . If I run it using the MFC example that is given out the SWF performs as expected. If I run it using the win32 code I get the white background.

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

Postby Softanics » Mon Feb 13, 2006 3:29 pm

chris1228 wrote:I have done both, FPCIsTransparentAvailable returns true and I call RegisterFlashWindowClass in the Main app. This is just a sub window . If I run it using the MFC example that is given out the SWF performs as expected. If I run it using the win32 code I get the white background.


Could you please send me zipped project files to support (at) flashplayercontrol.com? It's very interesting what's wrong. And I'll write here about results.
Thank you in advance!
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Wed Feb 15, 2006 3:03 pm

I sent the project files on Monday, I was wondering if there was any development on this?

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

Postby Softanics » Wed Feb 15, 2006 6:11 pm

chris1228 wrote:I sent the project files on Monday, I was wondering if there was any development on this?


I haven't received it :( If it's possible, could you upload the project anywhere on the WEB and post here the link. For instance, you can use http://rapidshare.de/ for uploading.
Thank you again for your help.
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Thu Feb 16, 2006 2:07 pm

Hrrrm wonder why you didn't get it. Must be the file size.

I removed the debug and release builds, so you will have to build it yourself, but here is the code.

http://rapidshare.de/files/13398702/TestTransparency.zip.html

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

Postby Softanics » Thu Feb 16, 2006 4:05 pm

chris1228 wrote:I removed the debug and release builds, so you will have to build it yourself, but here is the code.

http://rapidshare.de/files/13398702/TestTransparency.zip.html


I've just built the project. I see a semitransparent window. Screenshot is here:
http://rapidshare.de/files/13405381/Tes ... t.JPG.html

Did you build the MFC example? Does it work properly?
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Fri Feb 17, 2006 2:51 pm

Did you notice as it was going away however their was a WHITE background that remained for a second or two??

I agree it is transparent as it is fading in and as it fading out, but there is a white background that remains. If I increase the window and stage size to 500 X 500 it causes the white background except on the area that the movie is playing.

On the MFC example it worked fine, but we are not using MFC.

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

Postby Softanics » Mon Feb 20, 2006 7:58 am

chris1228 wrote:Did you notice as it was going away however their was a WHITE background that remained for a second or two??


No. Could you post screenshot?
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Mon Feb 20, 2006 6:50 pm

http://rapidshare.de/files/13727487/TransparancyTest.zip.html

There are two. On the one you can see the fade in is to a white background. The next you can see the white boarder around the window. Again using this SWF in MFC works fine. When I use it using win32 is when I get the white background

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

Postby Softanics » Tue Feb 21, 2006 8:35 am

chris1228 wrote:There are two. On the one you can see the fade in is to a white background. The next you can see the white boarder around the window. Again using this SWF in MFC works fine. When I use it using win32 is when I get the white background


May be the problem is occured when the coordinates of the window are big numbers... If you put the window on the center of the screen, do you see the same problem?
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Wed Feb 22, 2006 7:41 pm

When I first developed it I was using 0,0 as the topmost coordinate...can't get much smaller than that. So running with the project I gave you it works fine?

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

Postby Softanics » Wed Feb 22, 2006 9:01 pm

chris1228 wrote:So running with the project I gave you it works fine?


Yes, it works fine. I don't see the white background...
Best regards, Artem A. Razin,

F-IN-BOX support

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

chris1228
Posts: 16
Joined: Wed Nov 16, 2005 6:59 pm

Postby chris1228 » Thu Feb 23, 2006 3:41 pm

So do you have any other suggestions? You see the screen shots.


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 24 guests

cron