WPF:带阴影、带箭头的Popup提示框 WPF:带阴影、带箭头的Popup提示框效果图实现思路下载地址参考连接效果图实现思路首先感谢参考连接1的作者提供的思路开始打算使用Border+三角形的方法来实现提示框,但是最后发现走不通,因为阴影会被遮挡学习了一下WPF中的Path的绘制方法参考1+参考3最后总结了一下阴影部分的实现方法下载地址Demo参考连接1.使用Popup制作带箭头的弹出提示框2.自定义带尖括号和阴影的Popup框3.WPF中图形表示语法详解...
【FFMPEG】"width / height not divisible by 2" 解决方法 出现该错误的原因是在于:视频的宽度必须是32的倍数,高度必须是2的倍数解决方法: if (screen_width % 32 != 0) { screen_width = screen_width / 32 * 32; } if (screen_height % 2 != 0) { screen_height = screen_height / 2 * 2; }...
【FFMPEG】打印 av_log 的输出 在使用FFMPEG库的时候,如果有使用上的错误,FFMPEG 通过av_log 可以打印相应的消息到标准输出里。但有时候我们并没有标准输出,那么这个时候应该怎么处理呢? 方法:使用 av_log_set_callback 获取 av_log的打印输出。 示例如下:void Init(){ ... av_log_set_callback(&FFMPEG_Callba...
【FFmpeg】 图像缩放 在用FFmpeg时遇到需要将截屏的图像(1920*1080)转换为 1024*768的问题。//截屏的编码上下文 //假设这里视频截图分辨率为1920*1080AVCodecContext *pVideoCodecCtx = m_pVideoFormatCtx->streams[nVideoIndex]->codec;......//输出的编码上下文AVCodecConte...
数据结构和算法【C语言】---单链表 #include #include typedef struct node{ int data; struct node *pNext;}Node, *PNODE, *List;PNODE CreateNode(int data){ PNODE pNew = (Node *)malloc(sizeof(Node)); pNew->data = data; pNew->pN
【练习】有两个文件context.txt和words.conf,请尝试将他们合并成为一段文字, 有两个文件context.txt和words.conf,请尝试将他们合并成为一段文字,并打印出来。这两个文件内容如下:context.txt“并不是每个人都需要$(qunar)自己的粮食,$(flight.1)每个人都需要做自己穿的$(flight.2),我们说着别人发明的$(hotel),使用别人发明的数学......我们一直在$(tuan)别人的成果。使用人类的已有经验
【C++】链表学习 #include "stdafx.h"#include using namespace std;typedef struct Node{ int nVal; Node *pNext;}Link,*pLink;Link * CreateLink(int arr[], int n){ if (0 == n) { return NULL;
SYSTEMTIME 与 time_t 互转函数 time_t SystemTimeToTime_t( const SYSTEMTIME& st ){ tm temptm = {st.wSecond, st.wMinute, st.wHour, st.wDay, st.wMonth - 1, st.wYear - 1900, st
【C++】查询、创建、设置注册表键值的示例代码 示例代码将在注册表位置:HKEY_CURRENT_USER\Software\ 读写键值bool LicenseManage::OpenRegKey(HKEY& hRetKey){ if (ERROR_SUCCESS == RegOpenKey(HKEY_CURRENT_USER,"Software", &hRetKey)) { return true;
【C++】封装使用jsoncpp的类 封装使用jsoncpp的类包括5种功能1.是否存在节点 bool IsNodeExisted(string jsonObj, string strNode); 2.为数组增加元素 int AppendArrayObject(string& jsonObj, string strNode, string strValue);3.获取节点值 int
[OpenSSL]编译过程 【1】方式1 vc2008命令行编译 先下载ActivePerl,下载最新版本(现在是最新),文件名为ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi。安装。 下载openssl-1.0.1c,解压到C盘根目录下。 接下来是下载Microsoft Visual C++ 2008 Redistributable,该软件有些人需要
【MFC】按钮点击拷贝到剪切板 void CXX::OnBnClickedCopyButton(){ CString strSource; GetDlgItemText(IDC_DISPLAY_EDIT,strSource); if(OpenClipboard()) { HGLOBAL hClip; TCHAR* pBuffer; E
【笔试题】整理一 1.struct mybitfields { unsigned short a : 4; unsigned short b : 5; unsigned short c : 7; }testvoid main(void) { int i; test.a=2; test.b=3; test.c=0;i=*((short *)&test)
【算法】求二进制中1的个数 //除法int Count(int src){ int nNum = 0; while (src) { if (src % 2 == 1) { nNum++; } src /= 2; } return nNum;}//右移int Count1(int src)