当前位置:网站首页>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
边栏推荐
- SQLyog远程连接centos7系统下的MySQL数据库
- Carsim-问题Failed to start Solver: PATH_ID_OBJ(X) was set to Y; no corresponding value of XXXXX?
- Array and string processing, common status codes, differences between PHP and JS (JS)
- Erase method in string
- SQL server如何卸载干净
- Embedding malware into neural networks
- Principes fondamentaux de la théorie musicale (brève introduction)
- Carla-ue4editor import Roadrunner map file (nanny level tutorial)
- Brief introduction of prompt paradigm
- Global and Chinese market of wire loop, 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

OpenCV 6.4 中值滤波器的使用

简易打包工具的安装与使用

MySQL optimization

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

Embedding malware into neural networks

W10 is upgraded to W11 system, but the screen is black, but the mouse and desktop shortcuts can be used. How to solve it

Graph Pooling 简析

CarSim problem failed to start solver: path_ ID_ OBJ(X) was set to Y; no corresponding value of XXXXX?

How to wrap qstring strings

In the era of short video, how to ensure that works are more popular?
随机推荐
業務架構圖
Business architecture diagram
Data reverse attack under federated learning -- gradinversion
[learning notes] matlab self compiled image convolution function
Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?
Installation and use of simple packaging tools
Global and Chinese markets for Salmonella typhi nucleic acid detection kits 2022-2028: Research Report on technology, participants, trends, market size and share
A brief analysis of graph pooling
Using super ball embedding to enhance confrontation training
CVPR19-Deep Stacked Hierarchical Multi-patch Network for Image Deblurring论文复现
Graph Pooling 简析
使用C#语言来进行json串的接收
针对语义分割的真实世界的对抗样本攻击
Force buckle method summary: sliding window
最长等比子序列
Prompt 范式简述
E-R画图明确内容
Sequence problem for tqdm and print
关于原型图的深入理解
Look for we media materials from four aspects to ensure your creative inspiration