随笔分类 -  【Win32/64 SDK & OS】

摘要:在刚开始使用SCROLLINFO结构时感觉很不顺手,尤其其中的成员fMask理解不太深刻,经过查询资料才理解一二。 在使用滚动条功能时,如果要设置它的范围和位置可以用以前的函数,例如:SetScrollRange()、 SetScrollPos()、GetScrollRange()、GetScrollPos()等,但目前通常使用SetScrollInfo()与 GetScrollInfo(),使用这两个函数就要用到SCROLLINFO结构。 可以先定义一个SCROLLINFO结构变量si,用&si作为以上两个函数的参数。同BeginPaint()中的&ps、GetTextMet 阅读全文
posted @ 2011-04-20 18:24 Healtheon 阅读(23077) 评论(1) 推荐(2) 编辑
摘要:本文介绍在Windows程序开发中的MessageBox详解。 我们在在Windows程序设计中经常会涉及到一个格式化消息框,其代码如下:#include <windows.h>#include <tchar.h> #include <stdio.h> int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ……){ TCHAR szBuffer [1024] ; va_list pArgList ; // The va_start macro (defined... 阅读全文
posted @ 2011-04-19 12:16 Healtheon 阅读(6607) 评论(0) 推荐(2) 编辑
摘要:typedefstruct_SHELLEXECUTEINFO {DWORD cbSize;ULONG fMask;HWND hwnd;LPCTSTR lpVerb;LPCTSTR lpFile;LPCTSTR lpParameters;LPCTSTR lpDirectory;intnShow;HINSTANCE hInstApp;LPVOID lpIDList;LPCTSTR lpClass;HKEY hkeyClass;DWORD dwHotKey;union{HANDLE hIcon;HANDLE hMonitor;} DUMMYUNIONNAME;HANDLE hProcess;} SH 阅读全文
posted @ 2011-04-12 22:58 Healtheon 阅读(16753) 评论(0) 推荐(1) 编辑
摘要:本文介绍Windows API中的窗口注册类和消息结构的相关知识。 WNDCLASSEX窗口注册类: 结构体原型:typedef struct WNDCLASSEX { UINT cbSize; UINT style; WNDPROC lpfnWndProc; int cbClsExtra; int cbWndExtra; HINSTANCE hInstance; HICON hIcon; HCURSOR hCursor; HBRUSH hbrBackground; LPCTSTR lpszMenuName; LPCTS... 阅读全文
posted @ 2011-04-12 22:55 Healtheon 阅读(1521) 评论(0) 推荐(1) 编辑