Win32 Plus Extra Height of Caption Bar
you set the size of the non-client area by handling the WM_NCCALCSIZE message. But don't do this unless you plan to do all of the non-client drawing as well by handling WM_NCPAINT
Edit: here are two code fragments, one that handles WM_NCCALCSIZE and provides a simple n pixel border, and another than adds some extra pixels after DefWindowProc has done the default handling.
case WM_NCCALCSIZE:
{
lRet = ;
const int cxBorder = ;
const int cyBorder = ;
InflateRect((LPRECT)lParam, -cxBorder, -cyBorder);
} case WM_NCCALCSIZE:
{
LPNCCALCSIZE_PARAMS pncc = (LPNCCALCSIZE_PARAMS)lParam;
//pncc->rgrc[0] is the new rectangle
//pncc->rgrc[1] is the old rectangle
//pncc->rgrc[2] is the client rectangle lRet = DefWindowProc (hwnd, WM_NCCALCSIZE, wParam, lParam);
pncc->rgrc[].top += ExtraCaptionHeight;
}
You can learn a lot by passing WM_NCCALCSIZE to DefWindowProc and looking at the values of the NCCALCSIZEPARAM before and after.
Win32 Plus Extra Height of Caption Bar的更多相关文章
- Status bar and navigation bar appear over my view's bounds in iOS 7
转自:http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bo ...
- Customizing Navigation Bar and Status Bar
Like many of you, I have been very busy upgrading my apps to make them fit for iOS 7. The latest ver ...
- Using SetWindowRgn
Using SetWindowRgn Home Back To Tips Page Introduction There are lots of interesting reasons for cre ...
- File Input Features
文件输入功能 1.该插件将将一个简单的 HTML 文件输入转换为高级文件选取器控件.将有助于对不支持 JQuery 或 Javascript 的浏览器的正常 HTML 文件输入进行回退. 2.文件输入 ...
- KRBTabControl
This article explains how to make a custom Windows Tab Control in C#. Download demo project - 82.4 K ...
- windows程序设计读书笔记2——字符显示1
本程序使用GetSystemMetrics获取windows各种图像选项,并输出字符到窗口中. #define WINVER 0x0500 #include <windows.h> #in ...
- 《windows程序设计》学习_4:文本输出,加滚动条
//总行数 #define NUMLINES ((int) (sizeof sysmetrics / sizeof sysmetrics [0])) struct { int Index ; TCHA ...
- WTL介绍
WTL简单介绍 关键词: WTL WTL是一个好东东.它开发的程序都很短小精悍.对开发WIN32的应用有很好的优点.它不用MFC开发.但可以高速产生窗体和控件. 以文本方式查看主题 - 温馨小筑 ...
- Installshield停止操作系统进程的代码 --IS6及以上版本适用
原文:Installshield停止操作系统进程的代码 --IS6及以上版本适用 setup.rul的代码 Code;end;///////////////////////////////////// ...
随机推荐
- 在Nginx 下运行 Laravel5.1 的配置
一.nginx 的 vhost.conf 配置: server { listen ; server_name sub.domain.com; set $root_path '/srv/www/defa ...
- Pull解析xml
没有写抛出的异常,例子是含有多个Person对象persons.xml(此片内容未写写入的代码),包含id,name,email,address标签,Person对象含有id,name,email,a ...
- DOS下无法调出中文输入法-Solved
From:http://www.cnblogs.com/killerlegend/p/3750542.html Author:KillerLegend Date:2014.5.24 DOS下无法打开中 ...
- express中使用 connect-flash 及其源码研究
刚开始摸node.js, 在用express 4.x 的过程中 有一个connect-flash的玩意 如上图, 在 /reg 页面提交注册信息的时候 如若两次输入的密码不匹配则调用请求对象req的f ...
- C#之匿名类型与隐式局部变量
一.匿名类型 下面一段代码展示了如何定义并且使用匿名类型: static void Main(string[] args) { var patent1 = new { Title = "Ne ...
- SAP CRM 项目笔记(一) SOW(工作说明书)讨论
前记 前两天在搜索资料时,看到一个网友在博客里面记录下了自己参于项目中的所有笔记.我觉得这个想法很不错,所以决定开笔记录下SAP CRM整个项目的实施和开发过程. 之前参加集团的SAP ERP(FI/ ...
- spring 3 的 @value的使用
Spring 3支持@value注解的方式获取properties文件中的配置值,大大简化了我们读取配置文件的代码.使用方式如下: 1.首先必须要配置properties文件的加载bean:在spri ...
- DWR在Spring中应用
这里以传递一个对象为例,来说明dwr在Spring中是怎么配置的. JSP页面: <script src='dwr/interface/instructionOuterService.js'&g ...
- golang的函数
在golang中, 函数是第一类值(first-class object), 即函数可以赋值与被赋值. 换言之, 函数也可以作为ReceiverType, 定义自己的method. 实例: http. ...
- Awesome Swift
Awesome Swift https://github.com/matteocrippa/awesome-swift A collaborative list of awesome Swift re ...