DirectWrite处理WM_SIZE消息
摘要:
对于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(wi... 阅读全文
posted @ 2012-09-15 21:36 翰墨小生 阅读(1509) 评论(0) 推荐(0) 编辑