代码改变世界

基于C++ Builder的自定义IP地址控件

2012-10-31 21:26 by 每天努力一点点, 293 阅读, 0 推荐, 收藏,
摘要:因在网上未搜索到合适的IP地址输入控件,所以自己基于C++ Builder做了自定义的控件,附件编译之后,会生成jerry2.bpl,会自动在samples增加控件TIPEdit。IPEdit.h http://my.csdn.net/my/code/detail/25012IPEdit.cpp http://my.csdn.net/my/code/detail/25013 阅读全文

Linux上使用mail命令发送带附件邮件

2012-10-12 19:52 by 每天努力一点点, 715 阅读, 0 推荐, 收藏,
摘要:1.使用mail发送单个附件uuencode file_path file | mail -s "file" 123@***.com2.使用mail发送多个附件uuencode /root/zyx.cap zyx.cap >attach1.txtuuencode /root/sendmail.pl sendmail.pl >attach2.txtcat msg.txt attach1.txt attach2.txt>combined.txtmail -s "cesho" 123@***l.com <combined.txt 阅读全文

windows编程修改IP(代码片段)

2012-04-22 14:27 by 每天努力一点点, 211 阅读, 0 推荐, 收藏,
摘要:Adapter.h#ifndef AdapterH#define AdapterH#include #include #include #include #include #include "AdapterInfo.h"#include "lib.h"#include "ProcessView.h"#include "IpUtil.h"#include "MyUnicodeString.h"#pragma comment(lib, "IPHLPAPI.lib")using n 阅读全文

在快速启动栏和桌面创建快捷方式(代码片段)

2012-04-22 14:25 by 每天努力一点点, 262 阅读, 0 推荐, 收藏,
摘要:bool CreateQuickLaunchShortcut(String& destFile,String& shortCutName,String& arguments){ char szBuf[MAX_PATH];LPITEMIDLIST lpItemIdList;SHGetSpecialFolderLocation(0, CSIDL_APPDATA, &lpItemIdList);SHGetPathFromIDList(lpItemIdList, szBuf);String dir = String(szBuf) + "\\Microsoft\ 阅读全文

获取桌面路径、应用程序常用存放数据目录

2012-04-22 14:21 by 每天努力一点点, 265 阅读, 0 推荐, 收藏,
摘要:UnicodeString getDesktopDir(){char szBuf[MAX_PATH];LPITEMIDLIST lpItemIdList;SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, &lpItemIdList);SHGetPathFromIDList(lpItemIdList, szBuf);String dir = String(szBuf);return dir;}UnicodeString getApplicationDataDir(){ char szBuf[MAX_PATH];LPITEMIDLI 阅读全文

c++ builder 只允许程序运行一个实例

2011-04-04 08:19 by 每天努力一点点, 282 阅读, 0 推荐, 收藏,
摘要:HANDLE hMutex = CreateMutex(NULL,FALSE,"xxexe"); // 运行一次 if(hMutex == NULL || ERROR_ALREADY_EXISTS == ::GetLastError()) { return 0; } 阅读全文

c++ builder 获取命令行参数

2011-02-03 16:46 by 每天努力一点点, 291 阅读, 0 推荐, 收藏,
摘要:1、第一种方式:完整的命令行参数:CmdLine。包含程序名和所有的参数,是一个字符串。2、第二种方式:命令行参数的数量:ParamCount();命令行参数:ParamStr(i)(i表示参数序号,0表示程序名,1表示第一个参数) 阅读全文

隐藏程序主窗口

2011-02-03 16:42 by 每天努力一点点, 180 阅读, 0 推荐, 收藏,
摘要:Application->ShowMainForm = false; 阅读全文

在桌面和快速启动中创建快捷方式

2011-02-01 22:54 by 每天努力一点点, 277 阅读, 0 推荐, 收藏,
摘要://---------------------------------------------------------------------------#ifndef ShortCutCreatorH#define ShortCutCreatorH#include #pragma hdrstop#include struct TShortcutCfg{ // 构造函数 TShortcutCfg() { nShowCmd = SW_SHOWNORMAL; wHotKey = 0; nIconIndex = 0; } // 结构成员: AnsiString strShortcutName; // 阅读全文

获取控制台程序输入信息

2011-02-01 20:35 by 每天努力一点点, 247 阅读, 0 推荐, 收藏,
摘要:文件ProgramExec.h//---------------------------------------------------------------------------#ifndef ProgramExecH#define ProgramExecH#include "MyUnicodeString.h"//---------------------------------------------------------------------------DWORD WINAPI ReadFromPipe(LPVOID args);/* globals */# 阅读全文
上一页 1 ··· 5 6 7 8 9 10 下一页