1.响应系统消息 WM_DROPFILES2.在响应函数里面获取拖拽文件路径 1 LRESULT OnDropFiles(UINT uMsg, WPARAM wParam, LPARAM lParam) 2 { 3 HDROP hDropInfo = (HDROP)wParam; 4 5 ...
CWnd::OnCtlColor afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor ); 返回值:OnCtlColor必须返回一个刷子句柄,该刷子将被用于画出控件的背景。 参数:pDC 包含了子窗口的显示设备环...
分类:
其他好文 时间:
2014-10-27 22:31:31
阅读次数:
220
The expressionT(v)converts the valuevto the typeT.Some numeric conversions:var i int = 42var f float64 = float64(i)var u uint = uint(f)Or, put more si...
分类:
其他好文 时间:
2014-10-26 21:06:03
阅读次数:
264
操作系统将每个事件都包装成一个称为消息的结构体MSG来传递给应用程序SG来传递给应用程序
typedef struct tagMSG {
HWND hwnd; //句柄(HANDLE),资源的标识。
UINT message; //无符号的整型
WPARAM wParam; //整型,消息的附加信息
LPARAM lPara...
分类:
其他好文 时间:
2014-10-26 11:46:12
阅读次数:
208
//判断是否为闰年uchar Whether_LeapYear(uint y){ return ( y % 4 == 0 && y % 100 != 0 ) || (y % 400 == 0);}条件1:能被4整除,且不能被100整除条件2:能被400整除满足两者之一,即为闰年,返回1
分类:
其他好文 时间:
2014-10-25 10:32:20
阅读次数:
119
MessageBox()函数,这是一个极常用的Win32 API,在屏幕显示一个窗口,询问问题并等待用户输入。其原型为 int MessageBox(HWND hwnd,LPCTSTR lptext, LPCTSTR lpcation,UINT utype)
hwnd 为父窗口句柄,设置为NULL,表示使用Windows 桌面作为其父窗口。
lptext 为一个以NULL结尾的字符串,表示包含...
分类:
其他好文 时间:
2014-10-24 20:48:24
阅读次数:
173
// Literal Values// TYPE(S) CATEGORY SUFFIX EXAMPLE/ALLOWED VALUES// bool boolean none true or false// int, uint, long, ulong integer none 100// uint,...
分类:
其他好文 时间:
2014-10-22 21:41:43
阅读次数:
186
数组头文件ngx_array.h#include #include struct ngx_array_s { void *elts; ngx_uint_t nelts; size_t size; ngx_uint_t nalloc; n...
分类:
其他好文 时间:
2014-10-22 18:04:07
阅读次数:
224
本文分析 ngxin.c 中的 ngx_get_options 函数,其影响:nginx.c 中的:static ngx_uint_t ngx_show_help;static ngx_uint_t ngx_show_version;static ngx_uint_t ngx_show_...
分类:
其他好文 时间:
2014-10-22 17:33:58
阅读次数:
283
virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { if( wParam == SC_CLOSE ) { ::PostQuitMessage(0L); bHandle...