当前位置:网站首页>Short video with goods source code, double-click to zoom in when watching the video
Short video with goods source code, double-click to zoom in when watching the video
2022-07-02 08:14:00 【Cloudleopard network technology】
Short video with goods source code , Double click to enlarge the relevant code when watching the video
1. Playing video DIALOG Get the current playback box
CRect curRect;
GetClientRect(&curRect);
2. Determine the current magnification required , Determine the length and width of the enlarged frame (z For multiple ).
normalWidth = curRect.right;
normalHeight = curRect.bottom;
amplifyWidth = curRect.right * z;
amplifyHeight = curRect.bottom * z; else
{
if (point.x<normalWidth / 2*z)
{
if (point.y < normalHeight / 2*z || point.y>normalHeight - normalHeight / 2*z)
{
if (point.y<normalHeight / 2*z)
{
MoveWindow(0, 0, amplifyWidth, amplifyHeight);
}
else
{
MoveWindow(0, -(amplifyHeight - normalHeight), amplifyWidth, amplifyHeight);
}
}
else
{
MoveWindow(0, -point.y * z+0.5*normalHeight, amplifyWidth, amplifyHeight);
}
}
else if (point.x>normalWidth - normalWidth / 2*z)
{
if (point.y < normalHeight / 2*z || point.y>normalHeight - normalHeight / 2*z)
{
if (point.y<normalHeight / 2*z)
{
MoveWindow(-(amplifyWidth - normalWidth), 0, amplifyWidth, amplifyHeight);
}
else
{
MoveWindow(-(amplifyWidth - normalWidth), -(amplifyHeight - normalHeight), amplifyWidth, amplifyHeight);
}
}
else
{
MoveWindow(-(amplifyWidth - normalWidth), -point.y * z+0.5*normalHeight, amplifyWidth, amplifyHeight);
}
}
else if (point.y<normalHeight / 2*z)
{
MoveWindow(-point.x * z+0.5*normalWidth, 0, amplifyWidth, amplifyHeight);
}
else
{
MoveWindow(-point.x * z+0.5*normalWidth, -(amplifyHeight - normalHeight), amplifyWidth, amplifyHeight);
}
3. At this point, the logical code is basically over . If you want to zoom in , And zoom in restore . Then put a layer on the outside if Judge .
if (isZoom==false)
{
isZoom=true;
········
}
else
{
MoveWindow(0,0,normalWidth,normalHeight);
isZoom = false;
}
That's all Short video with goods source code , Double click to enlarge the relevant code when watching the video , More content welcome to follow the article
边栏推荐
猜你喜欢

樂理基礎(簡述)

Static library and dynamic library
![[learning notes] matlab self compiled image convolution function](/img/82/43fc8b2546867d89fe2d67881285e9.png)
[learning notes] matlab self compiled image convolution function

11月24号,我们为“满月”庆祝

图像增强的几个方法以及Matlab代码

Target detection for long tail distribution -- balanced group softmax

Sequence problem for tqdm and print

Where do you find the materials for those articles that have read 10000?

Look for we media materials from four aspects to ensure your creative inspiration

Vs code configuration problem
随机推荐
How to back up the configuration before the idea when reinstalling the idea
How gensim freezes some word vectors for incremental training
High school mathematics compulsory one
SQL操作数据库语法
服务器的内网可以访问,外网却不能访问的问题
Chinese garbled code under vscade
install. IMG production method
稀疏矩阵存储
Eklavya -- infer the parameters of functions in binary files using neural network
Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?
Look for we media materials from four aspects to ensure your creative inspiration
Sqlyog remote connection to MySQL database under centos7 system
Business architecture diagram
Income in the first month of naked resignation
Dynamic extensible representation for category incremental learning -- der
Find and rfind methods in string
力扣方法总结:滑动窗口
Open3d learning note 3 [sampling and voxelization]
Open3d learning notes II [file reading and writing]
AR系统总结收获