Create a new MFC project, insert Windows Media Player control, and set the URL parameter to True for the property set fullscreen.
Add the Cwmpplayer4,cwmpcontrols3 class.
The control binds the associated variable CWMPPlayer4 m_player and sets CWMPControls3 M_control = M_player.get_controls (), in response to the Playstatechange message in order to achieve the loop playback, The message processing function is the following two sentences: M_control.play (); M_player.put_fullscreen (1); At this time debugging engineering, found that only the first full screen, the second after the full screen, M_player.put_fullscreen ( 1) This sentence does not work at all. Online basically is to put this sentence with MoveWindow () or SetWindowPos () instead, but the first interface does not have the original full-screen look good, and there will be a screen flash, especially when placed on the tablet to use. The root cause of not being able to fullscreen after the second time is because the control has finished playing the URL's media for the first time, because the playlist has no subsequent content, only stop, when the M_player.play () Response stop state is treated as the second instance, Windows Media Player Unable to maintain two instances are fullscreen. We can add the following code in the Playstatechange response function to ensure that the first instance does not stop and that the second instance is not generated: if (newstate = = 8) {M_player.put_url (_t ("c:\\users\\ Administrator\\desktop\\test_tool\\video\\mid1080p.avi "));}
The Windows Media Player control cannot be fullscreen the second time it is played