随笔分类 -  Win32API

1 2 下一页
调用系统对话框示例
摘要:演示如何调用系统对话框 (演示语言--delphi):uses ShlObj, Activex;procedure TForm1.Button2Click(Sender: TObject);var BrowseInfo: TBrowseInfo; ItemIDList: PItemIDList;... 阅读全文
posted @ 2014-09-19 23:08 云之灵 阅读(956) 评论(0) 推荐(0)
TreeView
摘要:树型视图是一种特别的窗口,我们可以使用它一目了然地表示某种层次关系。譬如象在资源管理器中左边窗口中的就是树型视图。您可以调用CreateWindowEx来创建树型视图,传递一个类名“"SysTreeView32"”,或者您也可以把它放到一个对话框中去。不要忘了在您的代码中加入InitCommonCo... 阅读全文
posted @ 2014-09-19 23:08 云之灵 阅读(814) 评论(0) 推荐(0)
窗体扩展样式常量
摘要:dwExStyle [in] Specifies the extended window style of the window being created. This parameter can be one or more of the following values. WS_EX_ACCEP... 阅读全文
posted @ 2014-09-19 23:07 云之灵 阅读(349) 评论(0) 推荐(0)
窗体样式常量
摘要:Window StylesWS_BORDER Creates a window that has a thin-line border.WS_CAPTION Creates a window that has a title bar (includes the WS_BORDER style).WS... 阅读全文
posted @ 2014-09-19 23:01 云之灵 阅读(372) 评论(0) 推荐(0)
DrawTextEx
摘要:DrawTextEx( DC: HDC; {设备句柄} lpchText: PChar; {文本} cchText: Integer; {要绘制的字符个数; -1 表示全部} var p4: TRect; ... 阅读全文
posted @ 2014-09-19 22:55 云之灵 阅读(764) 评论(0) 推荐(0)
DrawText
摘要:DrawText 函数功能:该函数在指定的矩形里写入格式化文本,根据指定的方法对文本格式化(扩展的制表符,字符对齐、折行等)。 函数原型:int DrawText(HDC hdc, LPCTSTR lpString, int nCount, LPRECT lpRect, UINT uFormat... 阅读全文
posted @ 2014-09-19 22:53 云之灵 阅读(1344) 评论(0) 推荐(0)
Rect 的相关操作
摘要:1.BOOL EqualRect( CONST RECT *lprc1, // first rectangle CONST RECT *lprc2 // second rectangle ); 说明:判断两个矩形结构是否相同。 非零表示成功,零表示失败。会设置GetLas... 阅读全文
posted @ 2014-09-19 22:52 云之灵 阅读(656) 评论(0) 推荐(0)
修改进程访问权限
摘要:OpenProcessToken 要对一个任意进程(包括系统安全进程和服务进程)进行指定了写相关的访问权的OpenProcess操作,只要当前进程具有SeDeDebug权限就可以了。要是一个用户是Administrator或是被给予了相应的权限,就可以具有该权限。可是,就算我们用Admin... 阅读全文
posted @ 2014-09-19 22:51 云之灵 阅读(614) 评论(0) 推荐(0)
Class Styles
摘要:The class styles define additional elements of the window class. Two or more styles can be combined by using the bitwise OR (|) operator. To assign a ... 阅读全文
posted @ 2014-09-19 22:50 云之灵 阅读(252) 评论(0) 推荐(0)
PolyPolyLine
摘要:PolyPolyline( DC: HDC; {设备环境句柄} var Points; {点数组} var nPoints;{数组, 数组元素是每个组的顶点数} p4: Integer {分组数, 也就是 nPoints 的元素数}): BOOL;-------------------... 阅读全文
posted @ 2014-09-19 22:49 云之灵 阅读(1066) 评论(0) 推荐(0)
滚动条
摘要:TScrollInfo 结构体。在Delphi中定义在windows单元下。定义如下: tagSCROLLINFO = packed record cbSize: UINT; //结构体大小,在使用时首先要初始化 SizeOf(ScrollInfo) fMask: UIN... 阅读全文
posted @ 2014-09-19 22:48 云之灵 阅读(170) 评论(0) 推荐(0)
备忘录
摘要:1.任务条窗口的类名是“Shell_TrayWnd”,托盘区窗口的类名是TrayNotifyWnd 阅读全文
posted @ 2014-09-19 22:47 云之灵 阅读(163) 评论(0) 推荐(0)
设定窗体显示状态(ShowWindow)
摘要:API函数 ShowWindow 用来设定窗体的显示状态。原型声明如下:BOOL ShowWindow( HWND hWnd, // handle to window int nCmdShow // show state); 第一个参数 hWnd 指定要设定窗口的句柄。第二个参... 阅读全文
posted @ 2014-09-19 22:46 云之灵 阅读(5327) 评论(0) 推荐(2)
使任务栏上窗口按钮闪烁(FlashWindowEX)
摘要:API中提供了两个函数:FlashWindow、FlashWindowEx。 FlashWindow函数原型声明如下: BOOL FlashWindow( HWND hWnd, // handle to window BOOL bInvert //... 阅读全文
posted @ 2014-09-19 22:45 云之灵 阅读(1189) 评论(0) 推荐(0)
调用外部文件(ShellExecute)
摘要:有三个API函数可以运行可执行文件WinExec、ShellExecute和CreateProcess。CreateProcess因为使用复杂,比较少用。 WinExec主要运行EXE文件。如:WinExec('Notepad.exe Readme.txt', SW_SHOW); ShellEx... 阅读全文
posted @ 2014-09-19 22:44 云之灵 阅读(622) 评论(0) 推荐(0)
字体函数 -- GetDeviceCaps
摘要:函数功能:该函数检索指定设备的设备指定信息。 函数原型:int GetDeviceCaps(HDC hdc, int nlndex); 参数: 1、hdc:设备上下文环境的句柄。 2、nIndex:指定返回项,该参数取下列一值。(C++) DRIVERVERSION:设备驱动程序版本。 ... 阅读全文
posted @ 2014-09-19 22:43 云之灵 阅读(2743) 评论(0) 推荐(0)
字体函数 -- EnumFonts
摘要:函数功能: 该函数列举一个指定设备可用的字体,对那些有指定字样名的字体,EnumFonts取得该字 体的信息,并将信息传给应用程序定义的回调函数。回调函数可以按期望处理字体信息。当 再没有字体可列举或回调函数返回零时,列举停止。 函数原型:int EnumFonts(HDC hdc, LPC... 阅读全文
posted @ 2014-09-19 22:42 云之灵 阅读(721) 评论(0) 推荐(0)
字体函数 -- EnumFontFamilies
摘要:函数功能: 该函数列举指定设备环境下的指定字体族里的字体。 函数原型:int EnumFontFamilies (HDC hdc, LPCTSTR lpszFamily, FONTENUMPROC lpEnumFontFamProc, LPARAM lParam);参数: hdc:设备环境句柄。... 阅读全文
posted @ 2014-09-19 22:41 云之灵 阅读(1339) 评论(0) 推荐(0)
回调函数 EnumFontFamProc
摘要:函数功能: 该函数是由应用程序定义的与函数EnumFontFamilies一起使用的回调函数,它接 收用于描述与可用字体的数据。类型FONTENUMPROC定义了一个指向此回调函数的指针,Enum FontFamProc是应用程序定义的函数的名字的占位符。 函数原型:int CALLBACK En... 阅读全文
posted @ 2014-09-19 22:40 云之灵 阅读(409) 评论(0) 推荐(0)
AlphaBlend
摘要:BOOL AlphaBlend( HDC hdcDest, // handle to destination DC int nXOriginDest, // x-coord of upper-left corner int nYOrigin... 阅读全文
posted @ 2014-09-19 22:39 云之灵 阅读(386) 评论(0) 推荐(0)

1 2 下一页