摘要: 本例效果图: program Project1; uses Windows, Messages; {供 WM_CLOSE 消息调用的自定义过程} procedure OnClose(h: HWND); begin if IDOK = MessageBox(h, '确认关闭吗?', '提示', MB_OKCANCEL) then DestroyWindow(h); end; ... 阅读全文
posted @ 2008-04-18 22:12 万一 阅读(3436) 评论(0) 推荐(1)
摘要: 本例效果图: program Project1; uses Windows, Messages; {供 WM_PAINT 消息调用的自定义过程} procedure OnPaint(h: HWND); const str = 'CodeGear Delphi 2007'; var DC: HDC; ps: PAINTSTRUCT; Rect: TRect; begin ... 阅读全文
posted @ 2008-04-18 21:29 万一 阅读(3538) 评论(18) 推荐(0)
摘要: 本次我把生成窗口的过程做了简化, 以凸现新注入的代码; 本例效果图: program Project1; uses Windows, Messages; function WndProc(wnd: HWND; msg: UINT; wParam: Integer; lParam: Integer): Integer; stdcall; begin Result := 0; ca... 阅读全文
posted @ 2008-04-18 13:59 万一 阅读(3268) 评论(0) 推荐(0)
摘要: wvsprintf 函数声明: wvsprintf( Output: PChar; {用于返回的缓冲区} Format: PChar; {格式; 类似与 Format 的格式, 应该是和 C 语言的 printf 的格式相同} arglist: va_list {数组指针} ): Integer; {返回到缓冲区的实际字符串的长度} wvsprintf 函数... 阅读全文
posted @ 2008-04-18 01:20 万一 阅读(8474) 评论(1) 推荐(0)