Issue with Text Label at Task Bar

DLL Edition of the F-IN-BOX
Bikram Thapa
Posts: 29
Joined: Mon Nov 17, 2008 3:24 pm
Location: India

Issue with Text Label at Task Bar

Postby Bikram Thapa » Fri Dec 12, 2008 2:48 pm

Hi Support,

I am developing a SDI MFC application(Unicode). The application has no main window.It simply sits on system tray and context menu is displayed from there. The class to implement trayicon is implemented in ChildView.cpp
The applicaton in
CMainFrame::LoadFlashMovie(CString moviePath, CString movieTitle)

uses these two functions

FPC_LoadMovie(hwndFlashPlayerControl,0,moviePath);
pFlashProjectorWnd->SetWindowText(movieTitle);

function to load swf files. I extended MFC sample4 translucency to be used in this application. All goes well except few things.

The sample4, when it runs is visible on taskbar by default. But my flash movies, when run have no taskbar by default.

To display taskbar I use the function
ModifyStyleEx(0, WS_EX_APPWINDOW);
Now the taskbar is visible but only the first character of the moviTitle is shown.

Also what is diff between FPC_LoadMovie and FPC_PutMovie. In our case the user can play multiple(different) movies at same time, though we force only one instance of one particular movie to be played at any given time. Which function should preferably be used in such a scenario?

Please guide.

Thanks & Regards
Bikram Thapa...

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

Re: Issue with Text Label at Task Bar

Postby Softanics » Fri Dec 12, 2008 4:20 pm

Thank you for your questions.

Bikram Thapa wrote:pFlashProjectorWnd->SetWindowText(movieTitle);
...
Now the taskbar is visible but only the first character of the moviTitle is shown.


Could you please show (a piece of code) me how do you create a window?

Bikram Thapa wrote:Also what is diff between FPC_LoadMovie and FPC_PutMovie. In our case the user can play multiple(different) movies at same time, though we force only one instance of one particular movie to be played at any given time. Which function should preferably be used in such a scenario?


FPC_LoadMovie loads a movie into a specified level. So you can play a few movies within a single f-in-box window at the same time.

If you don't need to show more than one movie, use FPC_PutMovie.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Bikram Thapa
Posts: 29
Joined: Mon Nov 17, 2008 3:24 pm
Location: India

Postby Bikram Thapa » Sat Dec 13, 2008 6:20 am

Hi Support,
Here is the code snippet:

Code: Select all

m_hFPC = FPC_LoadRegisteredOCX();   
if (NULL == m_hFPC)
{
   AfxMessageBox(_T("FPC_LoadRegisteredOCX() failed"));
   return FALSE;
}
if (!FPCIsTransparentAvailable())
{
   AfxMessageBox(_T("Flash transparent is not available"));
   return FALSE;
}
RECT rc = { 0, 0, 640, 480 };

#ifndef WS_EX_LAYERED
#define WS_EX_LAYERED           0x00080000
#endif // WS_EX_LAYERED

HWND hwndFlashPlayerControl = CreateWindowEx(WS_EX_LAYERED,
               (LPCTSTR)FPC_GetClassAtom(m_hFPC),
               NULL, WS_POPUP | WS_VISIBLE,
               rc.left, rc.top,
               rc.right,
               rc.bottom,
               m_hWnd, /*NULL*/
               NULL,
               NULL,
               NULL);
CTransparentFlashPlayerControlWnd* pFlashProjectorWnd = new CTransparentFlashPlayerControlWnd(nDX,mycmdMap[nDX].romName);//Pass nDX to uniquely identify each rom
   pFlashProjectorWnd->SubclassWindow(hwndFlashPlayerControl);      
pFlashProjectorWnd->SetWindowText(movieTitle);   
//pFlashProjectorWnd->ModifyStyleEx(0, WS_EX_APPWINDOW);
pFlashProjectorWnd->ShowWindow(SW_SHOW);
pFlashProjectorWnd->UpdateWindow();      
   FPC_LoadMovie(hwndFlashPlayerControl,0,moviePath);//FPC_PutMovie(hwndFlashPlayerControl,moviePath);            
FPC_PutStandardMenu(hwndFlashPlayerControl, FALSE);//Disable standard flash context menu
FPCSetEventListener(hwndFlashPlayerControl, FPCListener,(LPARAM)this);   
   
if(playSound.CompareNoCase(_T("true"))==0)
   FPC_EnableSound(m_hFPC, TRUE);        
else
   FPC_EnableSound(m_hFPC, FALSE);

return TRUE; //Function Ends



Regards
Bikram Thapa...

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

Postby Softanics » Sat Dec 13, 2008 6:24 am

Could you please change this part:

Code: Select all

HWND hwndFlashPlayerControl = CreateWindowEx(WS_EX_LAYERED,
               (LPCTSTR)FPC_GetClassAtom(m_hFPC),
               NULL, WS_POPUP | WS_VISIBLE,
               rc.left, rc.top,
               rc.right,
               rc.bottom,
               m_hWnd, /*NULL*/
               NULL,
               NULL,
               NULL);


into:

Code: Select all

HWND hwndFlashPlayerControl = CreateWindowExW(WS_EX_LAYERED,
               (LPCWSTR)FPC_GetClassAtomW(m_hFPC),
               NULL, WS_POPUP | WS_VISIBLE,
               rc.left, rc.top,
               rc.right,
               rc.bottom,
               m_hWnd, /*NULL*/
               NULL,
               NULL,
               NULL);


Does it solve the problem with the caption?

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

Bikram Thapa
Posts: 29
Joined: Mon Nov 17, 2008 3:24 pm
Location: India

No Luck With Task Bar Text

Postby Bikram Thapa » Sat Dec 13, 2008 10:19 am

Hi,

I tried as you suggested, no, it did not work. I must add that the window is not shown on taskbar by default, I have to force it to be shown on the taskbar.

Code: Select all

pFlashProjectorWnd->ModifyStyleEx(0, WS_EX_APPWINDOW);
pFlashProjectorWnd->UpdateWindow();


Bikram Thapa...

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

Postby Softanics » Sat Dec 13, 2008 10:51 am

It seems I need a sample project to test...

My email is support (at) f-in-box.com

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

theomania
Posts: 12
Joined: Thu Nov 03, 2005 4:31 pm

Postby theomania » Tue Jan 06, 2009 3:49 am

Hi,

I have experienced this problem and wonder if there is now a solution? I can easily reproduce the problem by simply compiling and running the sample04_Translucency MFC application as "Unicode" through VS properties, changing nothing else. The task bar will only show the first letter of the window title. Changing it back to multibyte and the issue is gone.

Thanks.

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

Postby Softanics » Tue Jan 06, 2009 5:08 pm

theomania wrote:I have experienced this problem and wonder if there is now a solution? I can easily reproduce the problem by simply compiling and running the sample04_Translucency MFC application as "Unicode" through VS properties, changing nothing else. The task bar will only show the first letter of the window title. Changing it back to multibyte and the issue is gone.


Could you please check this build:
http://f-in-box.com/TEMP/CCC67A8F-9CB9- ... in_box.zip

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

theomania
Posts: 12
Joined: Thu Nov 03, 2005 4:31 pm

Postby theomania » Wed Jan 07, 2009 3:19 am

This build does appear to work. :)

I have the Windows DLL version with source code, how am I able to upgrade the package to one containing this update?

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

Postby Softanics » Wed Jan 07, 2009 1:52 pm

theomania wrote:This build does appear to work. :)

I have the Windows DLL version with source code, how am I able to upgrade the package to one containing this update?


Download it using the same link as usually. If you have any problems please write me to http://f-in-box.com/support.html

Thank you!
Best regards, Artem A. Razin,

F-IN-BOX support

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

Bikram Thapa
Posts: 29
Joined: Mon Nov 17, 2008 3:24 pm
Location: India

Yes it works

Postby Bikram Thapa » Fri Jan 09, 2009 7:43 am

Yes, Its working at my end too. Thanks a lot.


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 4 guests