kevin55

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 5 6 7 8 9 10 下一页

2013年9月1日

摘要: void __fastcall TForm1::GetRootNodes(TTreeView *DestTreeView)//得到所有根节点{ TTreeNode *vNode = NULL; vNode = DestTreeView->Items->GetFirstNode(); while(vNode) { ShowMessage(vNode->Text);//处理查找到的根节点 vNode = vNode->getNextSibling(); }}//----... 阅读全文
posted @ 2013-09-01 11:24 kernel_main 阅读(1387) 评论(0) 推荐(0) 编辑

2013年8月25日

摘要: 1 // --------------------------------------------------------------------------- 2 // Form的构造函数中填充StrinGrid单元格 3 __fastcall TForm1::TForm1(TComponent* Owner) 4 : TForm(Owner) 5 { 6 for (int i = StringGrid1->FixedRows; i RowCount; i++) 7 { 8 for (int j = StringGrid1->FixedCols; j... 阅读全文
posted @ 2013-08-25 23:01 kernel_main 阅读(1638) 评论(0) 推荐(0) 编辑

摘要: 1 /* 2 调用DOS程序时不显示窗口 3 使 用 ShellExecute调 用 DOS程 序 时 可 以 不 显 示 窗 口 , 如 :*/ 4 ShellExecute(0, "open", "c:\\tools\\arj.exe", "a c:\\p.arj c:\\*.bat c:\\*.sys", NULL, SW_HIDE); 5 /*产生随机数代码*/ 6 int SecVal; 7 AnsiString Hour,Minute,Second; 8 int RandomVal; 9 Hour=Now().Format 阅读全文
posted @ 2013-08-25 22:35 kernel_main 阅读(2001) 评论(0) 推荐(0) 编辑

摘要: 1 //--------------------------------------------------------------------------- 2 /* 3 首先将一个列表框控件安放在Form上,并将其名称设为ListView1。 4 然后在其中添加若干项目作为试验对象。方法为:用鼠标右键单击控件, 5 在弹出的对话框中选择Columns Editor用来添加列和子列; 6 再选Items Editor用来添加项目(包含子列和主列上的内容)。 7 为了显示出子项目内容,需要在Object Inspector中修改ListView属性值, 8 将ViewStyle设置为vsRe. 阅读全文
posted @ 2013-08-25 22:26 kernel_main 阅读(1437) 评论(0) 推荐(0) 编辑

2013年8月6日

摘要: http://msdn.microsoft.com/zh-cn/library/esk3eey8.aspx 阅读全文
posted @ 2013-08-06 14:54 kernel_main 阅读(1097) 评论(0) 推荐(0) 编辑

2012年5月21日

摘要: #include "stdafx.h"#include <stdio.h> #include <fcntl.h> #include <io.h> #include <iostream> #include <fstream>#include <conio.h>#ifndef _USE_OLD_IOSTREAMS using namespace std; #endif // maximum mumber of lines the output console should have static const 阅读全文
posted @ 2012-05-21 22:18 kernel_main 阅读(1866) 评论(1) 推荐(0) 编辑

2012年5月20日

摘要: #include "stdafx.h"#include "SerialPort.h"#include "assert.h"CSerialPort::CSerialPort(){ memset(&m_OverlappedRead, 0, sizeof(m_OverlappedRead)); memset(&m_OverlappedWrite, 0, sizeof(m_OverlappedWrite)); m_bOpened = false; m_ReadComThread = NULL; m_hIDCom = NULL; 阅读全文
posted @ 2012-05-20 11:10 kernel_main 阅读(652) 评论(0) 推荐(0) 编辑

摘要: 1 #include "stdafx.h" 2 #include "Sms.h" 3 #include "Comm.h" 4 5 // 可打印字符串转换为字节数据 6 // 如:"C8329BFD0E01" --> {0xC8, 0x32, 0x9B, 0xFD, 0x0E, 0x01} 7 // 输入: pSrc - 源字符串指针 8 // nSrcLength - 源字符串长度 9 // 输出: pDst - 目标数据指针 10 // 返回: 目标数据长度 11 int gsmString2Bytes(c 阅读全文
posted @ 2012-05-20 11:09 kernel_main 阅读(2163) 评论(0) 推荐(0) 编辑

摘要: 一、问题的提出编写一个耗时的单线程程序: 新建一个基于对话框的应用程序SingleThread,在主对话框IDD_SINGLETHREAD_DIALOG添加一个按钮,ID为IDC_SLEEP_SIX_SECOND,标题为“延时6秒”,添加按钮的响应函数,代码如下: void CSingleThreadDlg::OnSleepSixSecond() { Sleep(6000); //延时6秒}编译并运行应用程序,单击“延时6秒”按钮,你就会发现在这6秒期间程序就象“死机”一样,不在响应其它消息。为了更好地处理这种耗时的操作,我们有必要学习——多线程编程。二、多线程概述 进程和... 阅读全文
posted @ 2012-05-20 00:11 kernel_main 阅读(304) 评论(1) 推荐(0) 编辑

2012年5月12日

摘要: #include <iostream>#include <list>using namespace std;int main(){ char cTemp; list<char> charlist; for(int i=0;i<5;i+=3) { cTemp='a'+i;//ASCII值加i charlist.push_front(cTemp); } cout << "list old:" <<endl; list<char>::iterator it; for(it=charlis 阅读全文
posted @ 2012-05-12 23:32 kernel_main 阅读(686) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 下一页