win32
文章平均质量分 79
BU折腾
这个作者很懒,什么都没留下…
展开
-
win32 创建一个透明窗口
#pragma once#include "stdafx.h"#include "resource.h"class TransparentWnd{public: TransparentWnd(); ~TransparentWnd(); BOOL Create(__in DWORD dwExStyle, __in_opt LPCWSTR lpWindowName, __in DWORD dwStyle, __in int X, __in int Y, __in int nWidth.原创 2021-05-12 17:05:08 · 3095 阅读 · 1 评论 -
用DirectX显示video时加边框
1、是给每帧图像加一个边框, 显示出来的视频的每一帧上下左右的几个像素都被填充的颜色覆盖掉了。HRESULT Demo::ShowVideo(D3DFORMAT Format, BYTE * image, int width, int height, int borderWidth){ HRESULT hr; int resizeYuvW = width; int resizeYuvH = height; // 锁定 swap-chain 表面. D3DLOCKED_RECT lr;原创 2020-07-16 14:57:47 · 443 阅读 · 0 评论 -
win32 捕获锁屏消息
1. 注册,一般在创建窗口的时候调用注册,销毁窗口的时候反注册。BOOLWINAPIWTSRegisterSessionNotification( HWND hWnd, DWORD dwFlags );BOOLWINAPIWTSUnRegisterSessionNotification( HWND hWnd );2.在消息循环中添加对WM_WTSSESSION_CHANGE消息的处理.我是这样用的:LRESULT Demo::WndP原创 2020-06-23 15:42:55 · 1144 阅读 · 0 评论 -
win32 实现滚屏的两种方式
代码实现的优点粗燥,思路是这么个思路。方法1. 在timer里面每次重画窗口LRESULT Demo::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ switch (message) { case WM_PAINT: { PAINTSTRUCT ps; RECT r; HDC hdc = BeginPaint(hWnd, &ps); HFONT hFont, hOldFont;原创 2020-06-19 17:49:27 · 394 阅读 · 0 评论