当前位置:网站首页>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
边栏推荐
- Li Kou daily one question brushing summary: binary tree chapter (continuous update)
- Using C language to realize MySQL true paging
- Prompt 范式简述
- STL速查手册
- [C # note] the data in DataGridView saved in WinForm is excel and CSV
- Replace self attention with MLP
- MySQL优化
- 力扣方法总结:双指针
- Open3d learning note 4 [surface reconstruction]
- Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?
猜你喜欢
Eklavya -- infer the parameters of functions in binary files using neural network
Open3d learning note 3 [sampling and voxelization]
Sequence problem for tqdm and print
Using transformer for object detection and semantic segmentation
Vscode下中文乱码问题
MySQL optimization
W10 is upgraded to W11 system, but the screen is black, but the mouse and desktop shortcuts can be used. How to solve it
Use C language to receive JSON strings
w10升级至W11系统,黑屏但鼠标与桌面快捷方式能用,如何解决
OpenCV 6.4 中值滤波器的使用
随机推荐
Summary of solving the Jetson nano installation onnx error (error: failed building wheel for onnx)
Eklavya -- infer the parameters of functions in binary files using neural network
Cvpr19 deep stacked hierarchical multi patch network for image deblurring paper reproduction
Find and rfind methods in string
Command line is too long
SQLyog远程连接centos7系统下的MySQL数据库
常量指针和指针常量
Replace convolution with full connection layer -- repmlp
C语言的库函数
MySQL优化
One of the reasons for WCF update service reference error
OpenCV3 6.2 低通滤波器的使用
Jetson nano installation tensorflow stepping pit record (scipy1.4.1)
针对语义分割的真实世界的对抗样本攻击
Media query usage
[learning notes] numerical differentiation of back error propagation
Learn to write article format
C语言实现XML生成解析库(XML扩展)
学习写文章格式
王-课外单词