Direct2D中DirectWrite处理WM_SIZE消息
来源:互联网 发布:绝地求生显卡驱动优化 编辑:程序博客网 时间:2024/05/16 19:35
对于DirectWrite程序,在窗口大小改变时,也要同步更新render target的尺寸,否则的话,所绘文本可能超出窗口之外。可以定义一个OnResize函数来更新render target的尺寸,然后再WM_SIZE中调用这个函数。
// When window size changed, we need to resize the render target as wellVOID OnResize(UINT width, UINT height){ if(g_pRenderTarget) { D2D1_SIZE_U size = D2D1::SizeU(width, height); g_pRenderTarget->Resize(size); }}
调用
case WM_SIZE: { UINT width = LOWORD(lParam); UINT height = HIWORD(lParam); OnResize(width, height); break; }
- Direct2D中DirectWrite处理WM_SIZE消息
- Direct2D中的DirectWrite
- Direct2D DirectWrite绘制文字
- WTL-Direct2D,DirectWrite,Windows Animation
- WM_SIZE消息
- 窗口 WM_SIZE 消息
- WM_SIZE 改变窗口大小 消息
- 枚举数组,static, WM_SIZE消息
- 控件大小改变消息 WM_SIZE
- WM_SIZE
- WM_SIZE
- Windows程序中什么事件发生时,窗口过程会收到一条WM_SIZE消息
- 64位 win7中设置窗口大小时 未能收到WM_SIZE消息
- MFC_OnSize_改变窗口大小(WM_SIZE消息映射)
- 用SendMessage/PostMessage发送WM_SIZE消息
- [Direct2D]图片处理
- Direct2D图片处理
- Direct2D中DWrite文字
- NS2.35中自带卫星网络集中式路由学习
- Orace学习了 第二天!
- arm-linux-gcc-4.3.2 安装配置及下载地址
- Direct2D中资源的创建顺序
- 关于例子
- Direct2D中DirectWrite处理WM_SIZE消息
- 心中的骚动
- hdu3415 Max Sum of Max-K-sub-sequence
- 如何判断一段程序是由C 编译程序还是由C++编译程序编译的
- JS input验证
- php-获取从今天开始计算第5个工作日的日期
- oracle “ORA-01219:数据库未打开:仅允许在固定表/视图中查询”的警告窗口!" 解决
- ssh 登录出现Are you sure you want to continue connecting (yes/no)?解决方法
- 你的代码写的很臭