Similar Threads:
1.Adding custom hotkeys to WMP using UI plugin
I've made a background UI plugin (using the WMP plugin
wizard), and have come across a problem: none of the
IWMPEvents functions like Mouse and Keyboard
Up/Down/Click seem to work. No matter what I press, they
just are never called. On the other hand, the functions
that notify my plugin when a user plays, pauses, stops,
moves to a different position, etc... work fine. I'm new
to COM and WMP plugin development, so I could very well
be missing something simple. If someone could tell me how
to get those functions to be called, using the
UI/Background wizard project as the base, I would be very
grateful.
2.Capturing keyboard-mouse events from a wmp ui plugin, using c++ wi
Hello,
I have problems capturing mouse and keyboard events from a wmp UI plugin. In
the help document, "Customizing the UI Plug-in":
"If your plug-in is configured to listen to Windows Media Player events, the
wizard will have generated default or empty implementations of all the
necessary event handlers, which you also modify or create."
Indeed, the wizard has generated empty implementations of Click,
DoubleClick, KeyDown, KeyPress, KeyUp, MouseDown, MouseMove and MouseUp
events. However, these events are never fired, functions are never called. I
tried all types of UI plugins, pressed every key, and clicked everywhere on
the player. Other events work fine, for example, PlayStateChange event is
fired for play-stop-pause actions.
I think mouse and keyboard events are disabled in some way. But I could not
find how. In another help document, "Capturing Keyboard and Mouse Events":
"To receive mouse movement and mouse click events, set the
SendMouseMoveEvents and SendMouseClickEvents properties to true."
Unfortunately, these properties are for "Windows Media Player Control", not
the player itself. There should be a way to enable these properties from a UI
plugin. Without mouse-keyboard events, how can it be a "user interface"
anyway?
My main intent is capturing mouse movements and clicks on the video when
playing, but I am not even close. If you know the way, please help.
3.Simple text box in UI plugin for WMP 10 using SDK
Okay, so I have a lot of C++ experience, but limited windows programming and
limited COM knowledge. I am trying to show a simple text box in a UI plugin
that I am developing with the VC++.NET wizard. It did not seem like I could
instantiate an CEdit object, so I found code on the net that allows to create
a CEdit box within a CContainedWindowT object. I can actually get it to
paint on the screen, but it freezes up WMP. I think I am handling the events
wrong.
So, in the CPluginWindow.h file, I added the following in the private section:
CContainedWindowT< CEditT<CWindow>, CWinTraitsOR<WS_BORDER | ES_AUTOVSCROLL
| ES_MULTILINE> > lyricsBox;
CEditT is what I found online define, I can append that code if necessary.
Then, I added a method to the CPluginWindow class as fallows to paint the
object:
void PaintChildObjects()
{
RECT rc;
GetClientRect(&rc);
RECT lyricsBoxPos = {5, 5, 5, 5};
lyricsBox.Create(this, 0, m_hWnd, &lyricsBoxPos, NULL,
WS_CHILD|WS_VISIBLE,
WS_EX_OVERLAPPEDWINDOW);
::SetWindowPos(lyricsBox.m_hWnd, NULL, 0, 0, 100, 100, SWP_NOZORDER |
SWP_NOACTIVATE);
lyricsBox.SetFont("Verdana");
}
I also added this to the CPluginWindow initializer list:
: lyricsBox(_T("Lyrics"), this, 0)
Then, from my plugin cpp code, in the CWmpplugin2::Create method, after the
plugin is "creat"ed, I added the call to the method I defined above:
// create the plugin window
RECT rcPos = { 0, 0, 100, 100};
HWND hWnd = m_pPluginWindow->Create(hwndParent, rcPos, _T("wmpplugin2
Plugin"));
if (NULL == hWnd)
{
delete m_pPluginWindow;
m_pPluginWindow = NULL;
return E_FAIL;
}
m_pPluginWindow->PaintChildObjects();
I did not update the message map at all, and I'm guessing that may be the
problem. It is just the default message map in CPluginWindow.h:
BEGIN_MSG_MAP(CPluginWindow)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
END_MSG_MAP()
Thanks so much!
I am just trying to make a simple plugin to show static lyrics.
4.How can tranfer my data (publickey) between HttpClient and HttpServer using INTERNET_FLAG_SECURE using MFC VC 6.0
Dear Friends,
I have developed web server that takes http request from http client.
both http server and http client is developed in vc++ 6.0 using MFC.
My problem:
The Http Client say (HC) give request for encryption key to Http Server
say(HS).Logically this process of transfering key between HC-HS must be
secure. For this reason i want to implement a method that Uses secure
transaction semantics.
I know about INTERNET_ FLAG (INTERNET_FLAG_SECURE).If i implemented
this flag on client side then what respective change web server should
follow
to get secure transaction on both side
Please Help me fast
Regards
Jignesh
5.problem of creating WMP activex control in MFC program
I have a project created with VC6 before, now we change to VS2005, When
rebuilding, I found a problem hard to resolve:
One of my views will create a WMP activex control in some cases, it works
fine if we build project using VC6, but when building with VS2005, the WMP
control will not show if no video is opened, and will show video only if some
video is opened( no control bar and progress bar ).
I did some searching on net, it seems because of some "windowless" control
feature.
Now my question is, I need the WMP control shows same as the one building
with VC6. Any one know how to do this?
below is some code of my project:
class CMyView : public CView
{
.....
public:
CWMPPlayer4 *m_pPlayer;
......
}
void CMyView::OnInitialUpdate()
{
CView::OnInitialUpdate();
m_pPlayer = new CWMPPlayer4;
CRect rct;
GetClientRect(rct);
m_pPlayer->Create(_T(""), WS_VISIBLE, rct, this, ID_PLAYER );
}
class CWMPPlayer4 : public CWnd
{
protected:
DECLARE_DYNCREATE(CWMPPlayer4)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x6BF52A52, 0x394A, 0x11D3, { 0xB1, 0x53, 0x0, 0xC0, 0x4F, 0x79,
0xFA, 0xA6 } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD
dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect,
pParentWnd, nID);
}
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect,
CWnd* pParentWnd,
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect,
pParentWnd, nID,
pPersist, bStorage, bstrLicKey);
}
......
}
6. 4 ZachD @ microsoft...MFC Runtime w/any WMP version
7. WMP 11, MFC, ActiveX, C++ (VS 2008) - put_uiMode("full") no effect
8. WMP ocx & MFC