摘要:
{ …… static char BASED_CODE szFilter[] = "*.ppt"; CFileDialog FileDlg(TRUE,"PPT",NULL,OFN_FILEMUSTEXIST|OFN_NONETWORKBUTTON |OFN_PATHMUSTEXIST,szFilter); FileDlg.DoModal(); // To get the s...
阅读全文
posted @ 2007-01-10 17:01
泡泡
阅读(2166)
推荐(0)
摘要:
一、程序唯一性控制//在APP InitInstance中写/////////这段代码使得本地只能开一个程序实例。hMutex = ::OpenMutex(MUTEX_ALL_ACCESS,TRUE,"KIPMutexName");if(hMutex){HWND hWnd=FindWindow(NULL,"KRISSER");if(hWnd)ShowWindow(hWnd,SW_RESTORE);...
阅读全文
posted @ 2006-11-03 15:37
泡泡
阅读(371)
推荐(0)
摘要:
1.创建函数BOOL CreateProcess( LPCTSTR lpApplicationName, LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFl...
阅读全文
posted @ 2006-09-22 17:00
泡泡
阅读(501)
推荐(0)
摘要:
1 AFX_EXT_CLASS 使得类为另一个项目所继承
阅读全文
posted @ 2006-09-12 09:06
泡泡
阅读(172)
推荐(0)
摘要:
CComboBox ccb;m_ccbArea.AddString(strArea);//添加值ccb.ResetContent();//删除控件列表下所有的项ccb.SetCurSel(ccb.FindString(0,m_strCity));//搜索列表项下从0项开始,值与字符串相同的,设置为当前项设置控件值变量,CString str; str="OK",ccb.UpdateData(FAL...
阅读全文
posted @ 2006-09-04 17:15
泡泡
阅读(374)
推荐(0)
摘要:
一、工作线程HANDLE hThread;//线程句柄//创建线程,先挂起。hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ThreadFunc,this,0,0); SuspendThread(hThread);//有使用线程时,再唤醒ResumeThread(hThread);//程序结束时,中止线程(建议不强行中止)Terminat...
阅读全文
posted @ 2006-09-01 11:06
泡泡
阅读(179)
推荐(0)
摘要:
1.ADO连接CAdoConnection adoCn;CAdoRecordSet adoRs(&adoCn);if(!adoCn.ConnectSQLServer(this->m_strDBSrc,this->m_strDBName,this->m_strDBUserid,this->m_strDBPwd))return FALSE;// "192.168.0.4...
阅读全文
posted @ 2006-08-21 17:49
泡泡
阅读(1775)
推荐(0)
摘要:
http://www.xfocus.com.cn/blog/more.asp?name=easy&id=9923.VC执行一个带参数的存储过程,返回单个值:CString retu;m_pCommand.CreateInstance("ADODB.Command");#ifdef _DEBUGif (m_pCommand == NULL){AfxMessageBox("Command 对象...
阅读全文
posted @ 2006-08-01 11:47
泡泡
阅读(1800)
推荐(0)
摘要:
一、CFilefile.Open(".\\log.txt", CFile::modeCreate | CFile::modeReadWrite | CFile::modeNoTruncate );{file.SeekToEnd();//使得每次写入都在上次写入的后面开始。若无,则每次覆盖上次写入的内容。 CString strfile ="iewo";file.Write((LPCSTR)strf...
阅读全文
posted @ 2006-07-31 10:23
泡泡
阅读(671)
推荐(0)
摘要:
一 更改表1.向表添加一个新列alter table 表名add column 列名 数据类型;oracle SQL :alter table --add -- --//--表示与上的相同PS:alter table **add column ^要大写,否则access中的执行不识别相应数据类型Code highlighting produced by Actipro CodeHighlighte...
阅读全文
posted @ 2006-07-13 11:18
泡泡
阅读(2026)
推荐(0)