当前位置:网站首页>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
边栏推荐
- I'll show you why you don't need to log in every time you use Taobao, jd.com, etc?
- St-link connection error invalid ROM table of STM32 difficult and miscellaneous diseases
- Data reverse attack under federated learning -- gradinversion
- Static library and dynamic library
- Using super ball embedding to enhance confrontation training
- Target detection for long tail distribution -- balanced group softmax
- 用于类别增量学习的动态可扩展表征 -- DER
- Media query usage
- Go functions make, slice, append
- 力扣方法总结:滑动窗口
猜你喜欢

Use C language to receive JSON strings

I'll show you why you don't need to log in every time you use Taobao, jd.com, etc?

浅谈深度学习中的对抗样本及其生成方法

Graph Pooling 简析

How to wrap qstring strings

Animation synchronization of CarSim real-time simulation
![Open3d learning notes 1 [first glimpse, file reading]](/img/68/68ea87817dbf788591216a32c9375b.png)
Open3d learning notes 1 [first glimpse, file reading]

It's great to save 10000 pictures of girls

C语言实现XML生成解析库(XML扩展)

11月24号,我们为“满月”庆祝
随机推荐
用C# 语言实现MYSQL 真分页
Data reverse attack under federated learning -- gradinversion
C # connect to MySQL database
Fundamentals of music theory (brief introduction)
Constant pointer and pointer constant
STM32疑难杂症之ST-LINK Connection error INVALID ROM TABLE
Sqlyog remote connection to MySQL database under centos7 system
关于原型图的深入理解
JVM instructions
Comparison between setTimeout and requestanimationframe (page refresh)
Eklavya -- infer the parameters of functions in binary files using neural network
Global and Chinese market of medicine cabinet 2022-2028: Research Report on technology, participants, trends, market size and share
11月24号,我们为“满月”庆祝
深入理解JVM
多站点高可用部署
AR system summary harvest
Global and Chinese market of wire loop, 2022-2028: Research Report on technology, participants, trends, market size and share
Use of OpenCV 6.4 median filter
Carsim 学习心得-粗略翻译1
Programmers can only be 35? The 74 year old programmer in the United States has been programming for 57 years and has not retired