2014年8月19日

在CFormView或对话框中动态添加CScrollView、CFormView

摘要: 在CFormView或对话框中动态添加CScrollView、CFormView本代码可以在CFormView中,根据事先画好的控件位置创建CScrollView也可以在CDialog中创建CScrollView、CFormView等注:若以下代码放在CMainRightView::OnCreate... 阅读全文

posted @ 2014-08-19 21:37 Leadtheway 阅读(1984) 评论(0) 推荐(1)

2014年8月15日

CreateDirectory 创建文件夹

摘要: 函数原型:CreateDirectory( LPCTSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes);简介: CreateDirectory 是Win32API函数,用于创建文件夹。 参数 lpPathName 表示路径 参数 ... 阅读全文

posted @ 2014-08-15 00:34 Leadtheway 阅读(2897) 评论(0) 推荐(0)

2014年8月13日

_tsplitpath_s(分解路径) _tmakepath_s(创建路径)

摘要: 函数原型:函数原型:errno_t _splitpath_s( const char * path, char * drive, size_t driveNumberOfElements, char * dir, size_t dirNumberOfElements, char * fname, s... 阅读全文

posted @ 2014-08-13 23:28 Leadtheway 阅读(2588) 评论(0) 推荐(0)

2014年5月19日

cctype 头文件定义函数

摘要: header (ctype.h)Character handling functionsThis header declares a set of functions to classify and transform individual characters.FunctionsThese fun... 阅读全文

posted @ 2014-05-19 16:01 Leadtheway 阅读(543) 评论(0) 推荐(0)

2014年4月14日

Mysql Odbc 连接参数

摘要: ODBC Driver for MySQLIf you want to connect to a local database, you can use a connection string like the following:strConnect = _T("Driver={MySQL ODB... 阅读全文

posted @ 2014-04-14 21:05 Leadtheway 阅读(1142) 评论(0) 推荐(0)

2014年4月10日

vc2008 中使用宏来添加注释的步骤

摘要: 在VS2008里面通过宏可以记录下注释信息,产生一个注释文件,每次需要的时候直接增加到类文件里面即可,方法如下:在vc中:tools->Macros->MacrosExplores 打开宏浏览器然后新建个宏工程 宏文件(Module1)名称修改为COMMENT 然后 将下列代码加入然后打开 工具->... 阅读全文

posted @ 2014-04-10 22:44 Leadtheway 阅读(387) 评论(0) 推荐(0)

使用vs2008编译log4cpp 1.1.1

摘要: log4cpp1.1.1编译使用vs20081、打开msvc7目录的msvc.sln,转换项目。2、Debug配置下需要 (1)将log4cpp工程 属性 链接器->输出文件 选择“从父级或项目默认目录继承”。 (2)在log4cppLIB工程中添加src目录下的localtime.cpp。 (3)编译Debug。3、Release配置下需要 (1)将log4cpp工程 属性c/c++的附加包含目录设置为../../include。 (2)将log4cpp工程 属性链接器->输出文件,选择“从父级或项目默认目录继承”。 (3)编译Release。参考http://blog.sina 阅读全文

posted @ 2014-04-10 21:30 Leadtheway 阅读(340) 评论(0) 推荐(0)

2014年4月6日

cin cin.get() cin.getline() getline() gets() getchar()

摘要: 1、cin2、cin.get()3、cin.getline()4、getline()5、gets()6、getchar()1、cin>>用法1:最基本,也是最常用的用法,输入一个数字:#include using namespace std;int main (){ int a,b; cin>>a>>b; cout> 是会过滤掉不可见字符(如 空格 回车,TAB 等)cin>>noskipws>>input[j];//不想略过空白字符,那就使用 noskipws 流控制用法2:接受一个字符串,遇“空格”、“TAB”、“回车”都结 阅读全文

posted @ 2014-04-06 20:21 Leadtheway 阅读(316) 评论(0) 推荐(0)

2014年4月4日

查看MySql版本号

摘要: 1、使用Mysql函数select version(); 阅读全文

posted @ 2014-04-04 20:34 Leadtheway 阅读(124) 评论(0) 推荐(0)

2014年3月30日

VC++使用用crtdbg定位内存泄露错误

摘要: #define _CRTDBG_MAP_ALLOC#ifdef _DEBUG#define new new( _CLIENT_BLOCK, __FILE__, #endif#include #include int main(){ int* p = new int(); _CrtDumpMemoryLeaks(); return 0;}可以【定位】出内存泄露的代码在哪一行!output信息如下:'Test.exe': Loaded 'E:\CODE\Test\Debug\Test.exe', Symbols loaded.'Test.exe': 阅读全文

posted @ 2014-03-30 19:25 Leadtheway 阅读(953) 评论(0) 推荐(0)

导航