| View previous topic :: View next topic |
| Author |
Message |
Bikram Thapa
Joined: 17 Nov 2008 Posts: 29 Location: India
|
Posted: Fri Dec 12, 2008 2:48 pm Post subject: Issue with Text Label at Task Bar |
|
|
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... |
|
| Back to top |
|
 |
Softanics Site Admin
Joined: 18 Sep 2004 Posts: 1253 Location: Russia, St. Petersburg
|
Posted: Fri Dec 12, 2008 4:20 pm Post subject: Re: Issue with Text Label at Task Bar |
|
|
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 |
|
| Back to top |
|
 |
Bikram Thapa
Joined: 17 Nov 2008 Posts: 29 Location: India
|
Posted: Sat Dec 13, 2008 6:20 am Post subject: |
|
|
Hi Support,
Here is the code snippet:
| Code: | 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... |
|
| Back to top |
|
 |
Softanics Site Admin
Joined: 18 Sep 2004 Posts: 1253 Location: Russia, St. Petersburg
|
Posted: Sat Dec 13, 2008 6:24 am Post subject: |
|
|
Could you please change this part:
| Code: |
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: |
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 |
|
| Back to top |
|
 |
Bikram Thapa
Joined: 17 Nov 2008 Posts: 29 Location: India
|
Posted: Sat Dec 13, 2008 10:19 am Post subject: No Luck With Task Bar Text |
|
|
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: |
pFlashProjectorWnd->ModifyStyleEx(0, WS_EX_APPWINDOW);
pFlashProjectorWnd->UpdateWindow();
|
Bikram Thapa... |
|
| Back to top |
|
 |
Softanics Site Admin
Joined: 18 Sep 2004 Posts: 1253 Location: Russia, St. Petersburg
|
Posted: Sat Dec 13, 2008 10:51 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
theomania
Joined: 03 Nov 2005 Posts: 12
|
Posted: Tue Jan 06, 2009 3:49 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Softanics Site Admin
Joined: 18 Sep 2004 Posts: 1253 Location: Russia, St. Petersburg
|
Posted: Tue Jan 06, 2009 5:08 pm Post subject: |
|
|
| 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-4368-A554-BDFA6D4F6316/f_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 |
|
| Back to top |
|
 |
theomania
Joined: 03 Nov 2005 Posts: 12
|
Posted: Wed Jan 07, 2009 3:19 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Softanics Site Admin
Joined: 18 Sep 2004 Posts: 1253 Location: Russia, St. Petersburg
|
Posted: Wed Jan 07, 2009 1:52 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Bikram Thapa
Joined: 17 Nov 2008 Posts: 29 Location: India
|
Posted: Fri Jan 09, 2009 7:43 am Post subject: Yes it works |
|
|
| Yes, Its working at my end too. Thanks a lot. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|