当前位置:网站首页>Easyplayerpro win configuration full screen mode can not be full screen why

Easyplayerpro win configuration full screen mode can not be full screen why

2022-06-24 08:08:00 Tsingsee green rhino video

Recently, I met a project team that plays panoramic video , Hope to use EasyPlayerPro Make a client program , But in debugging DEMO When I met a problem , That is, after the full screen mode is configured , Video can only appear in the upper left corner of the form .

EasyPlayerPro Play interface :

For this problem , We had a detailed communication with the project team , I learned that the current display is multi screen splicing display , use Nvidia Of Surround Configure multiple displays to be spliced into one display for use , The purpose is to improve the display effect . But even so , It should not be displayed in full screen when it should be full screen , Finally, we can only go back to checking the code .

Code detected at FullScreen() when , Suddenly I see the following code :

ShowWindow(SW_MAXIMIZE);

This code reveals some information , Let's start thinking about whether the current specified window maximization does not work for multi screen display , Or just valid for the current first screen ? So we started experimenting , Remove the maximization operation , At this time, the program appears in the middle of the screen , By dragging and dropping, you can maximize the effect of spreading the whole screen , Then I checked the current screen resolution , A resolution of :7688*4328.

Since you can maximize your requirements by dragging and dropping , Can we change our mind , Directly specify the resolution of the window , So we did the following experiments :

SetWindowPos(NULL, 0, 0, 7688, 4328, 0)

When drawing the form from the upper left corner, specify the width and height of the form , And then remove the window frame , After debugging and running , Too much can solve the problem , At this time, it can decisively solve the problems encountered by netizens “ Full screen ” problem .

The key codes are as follows :

//  Remove the title bar   
ModifyStyle(WS_CAPTION, 0); //(WS_POPUP | WS_BORDER | WS_CAPTION | WS_SYSMENU, WS_CHILD);
//  Remove border 
ModifyStyleEx(WS_EX_DLGMODALFRAME, 0);  
// The window position and size remain the same 
SetWindowPos(NULL, 0, 0, 7688, 4328, 0);//SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED); 
//SetWindowPos(NULL, 0, 0, 1920, 1080, 0);//SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED); 
// Maximization window 
ShowWindow(SW_NORMAL); 
//ShowWindow(SW_MAXIMIZE);// You can no longer use maximization , This maximization is only for the current screen maximization 

expand

EasyPlayerPro Although it supports almost all streaming protocols , But under a lot of scenarios and requirements ( for example :SDK Bag size , Custom protocol , Data encryption ),EasyPlayerPro The cost of customization is relatively high , There's no flexibility EasyPlayer-RTSP and EasyPlayer-RTMP The flexibility of dedicated players is high ,EasyPlayerPro It's about versatility , And the special player considers customization . So if you still want to know TSINGSEE Other special players developed by Qingxi video , Welcome to contact us , at present EasyPlayer The series is already supported H265 Encoded video playback , It also supports integration , Welcome to .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210628163530528N.html