Home > Back-end >  MFC lyrics synchronous display
MFC lyrics synchronous display

Time:10-07

In using MFC to do a P2P music player, don't know how to synchronize display lyrics, great god teach

CodePudding user response:

Read LRC England files, according to the timeline lyrics

CodePudding user response:

Little women feel the same way, but I don't know how to get playing time, hey hey, please grant instruction

CodePudding user response:

How do you play?

CodePudding user response:

Lazy directly with the WMP controls,,,

CodePudding user response:

Use currentPosition attributes for the current position, and then according to the timeline lyrics

CodePudding user response:

Go back to study, hey hey, thank you

CodePudding user response:

Excuse me, in the use of controls. CurrentPositionString: string, where to define controls?

CodePudding user response:

CWMPControls inside the class

CodePudding user response:

The class CWMPControls: public COleDispatchDriver
{
Public:
CWMPControls () {}//Calls COleDispatchDriver default constructor
CWMPControls (LPDISPATCH pDispatch) : COleDispatchDriver (pDispatch) {}
CWMPControls (const CWMPControls& DispatchSrc) : COleDispatchDriver (dispatchSrc) {}

//the Attributes
Public:

//Operations
Public:

BOOL GetIsAvailable (LPCTSTR bstrItem);
Void play ();
Void the stop ();
Void pause ();
Void fastForward ();
Void fastReverse ();
Double GetCurrentPosition ();
Void SetCurrentPosition (double newValue);
Cstrings GetCurrentPositionString ();
Void next ();
Void previous ();
CWMPMedia GetCurrentItem ();
Void SetCurrentItem (LPDISPATCH newValue);
Long GetCurrentMarker ();
Void SetCurrentMarker (long nNewValue);
Void playItem (LPDISPATCH pIWMPMedia);
};
Edge definition is defined in DIg inside here?

CodePudding user response:

The class CP2PDlg: public CDialog
{
//Construction
Public:
PParent CP2PDlg (CWnd *=NULL);//standard constructor

//Dialog Data
//{{AFX_DATA (CP2PDlg)
Enum {IDD=IDD_P2P_DIALOG};
CWMPPlayer4 m_player;
CWMPControls m_control;
I define so, why am I still tip does not define the error C2079: 'm_control USES undefined class' CWMPControls'

CodePudding user response:

Cited in advance before I am wrong,, the problem is solved, now I define m_control, call m_control. The play (); Prompt error C2228: left of 'play' must have a class/struct/union type

CodePudding user response:

11 references u012943192 response:
I was wrong, cited in advance, before the problem solved, now I define m_control, call m_control. Play (); Prompt error C2228: left of 'play' must have a class/struct/union type

It is better for complete code of points

CodePudding user response:

A great god genuflect is begged mailbox

CodePudding user response:

Is your m_control a pointer, or what? Written m_control - & gt; Have a try?

CodePudding user response:

Thank you, the problem has been resolved, this is in front of the "wmpplayer4. H" plus the header file: "wmpcontrols. H", then you can use
  • Related