- 博客(10)
- 收藏
- 关注
原创 遍历文件
function FindFilePath(Path,FileName: string): string;var RFileName:string; sr: TSearchRec; FileAttrs:Integer;begin Application.ProcessMessages; FileAttrs := faDirectory; RFileName
2006-03-15 17:41:00
494
原创 遍历文件
function FindFilePath(Path,FileName: string): string;var RFileName:string; sr: TSearchRec; FileAttrs:Integer;begin Application.ProcessMessages; FileAttrs := faDirectory; RFileName
2006-03-15 17:41:00
607
1
转载 选择目录
使用SHBrowseForFolder和SHGetPathFromIDList函数函数原形申明如下:WINSHELLAPI LPITEMIDLIST WINAPI SHBrowseForFolder(LPBROWSEINFO lpbi);WINSHELLAPI BOOL WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl, LPSTR pszPath); L
2006-03-13 12:55:00
934
原创 关闭与重起计算机
void SetPriviles(){ HANDLE hToken; TOKEN_PRIVILEGES tk; OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken); LookupPrivilegeValue(NULL,SE_SHUTDOWN_NAME,
2006-03-11 14:22:00
731
原创 编写和动态调用dll
编写 extern "C" __declspec(dllexport) int __stdcall test(int a);#pragma argsusedint WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved){ return 1;}//--------------------
2006-03-08 09:32:00
777
原创 目录中的所有文件添加到listview中
TSearchRec sr; TListItem *list; HICON hicon; String sTemp; TIcon *Icon=new TIcon(); int iCount = 0; ImageList1->Clear(); ListView1->Clear(); if (FindFirst(sPath+sCatption+
2006-03-08 09:19:00
996
原创 不拖动标题栏移动窗体,最大化窗体,最小化窗体,还原窗体
ReleaseCapture(); SendMessage(FrmMain->Handle,WM_SYSCOMMAND,0xF012,0); //移动窗体 SendMessage(FrmMain->Handle,WM_SYSCOMMAND,SC_MAXIMIZE,0); //最大化窗体 SendMessage(FrmMain->Handle,WM_SYSC
2006-03-08 09:17:00
1046
原创 在窗体的某一处显示图片
#pragma resource "IMAGE.RES" 调用资源文件void __fastcall TFrmMain::LoadImageX(TObject* Sender,char *sRc,int iX,int iY,int iWidth,int iHeight){ HDC dc; HBITMAP bit,oldbit; BITMAP bm; dc = C
2006-03-08 09:12:00
712
原创 阻塞方式
同步方式指的是发送方不等接收方响应,便接着发下个数据包的通信方式;而异步指发送方发出数据后,等收到接收方发回的响应,才发下一个数据包的通信方式。 阻塞套接字是指执行此套接字的网络调用时,直到成功才返回,否则一直阻塞在此网络调用上,比如调用recv()函数读取网络缓冲区中的数据,如果没有数据到达,将一直挂在recv()这个函数调用上,直到读到一些数据,此函数调用才返回;而非阻塞套接字是
2006-03-08 09:09:00
887
原创 不在任务栏上显示图标
DWORD dwExStyle = GetWindowLong(Application->Handle, GWL_EXSTYLE); dwExStyle |= WS_EX_TOOLWINDOW; SetWindowLong(Application->Handle, GWL_EXSTYLE, dwExStyle);
2006-03-08 09:07:00
924
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人