07 2016 档案

摘要:解决方案 VS2010在经历一些更新后,建立Win32 Console Project时会出“error LNK1123” 错误 解决方案为:项目|项目属性|配置属性|清单工具|输入和输出|嵌入清单 “是”改为“否”即可 阅读全文
posted @ 2016-07-28 23:15 Zohar 阅读(459) 评论(0) 推荐(0)
摘要:把控件中的值和变量进行交换 比如你有个编辑框,输入了一些值,你的程序怎么得到呢; 必须先调用这个(当然是 在用了ddx的情况) 反之控件的成员变量中的值也可以通过该函数自动显示到控件里面,根据传进来的是 true或者false 当你使用了ClassWizard建立了控件和变量之间的联系后:当你修改了 阅读全文
posted @ 2016-07-27 22:02 Zohar 阅读(195) 评论(0) 推荐(0)
摘要:要改变静态文本框的值,必须设置静态文本框控件的样式中(Notify通知)勾选 CString str; if(GetDlgItem(IDC_NUMBER1)->GetWindowText(str),str == "Number1:") { GetDlgItem(IDC_NUMBER1)->SetWi 阅读全文
posted @ 2016-07-27 21:59 Zohar 阅读(248) 评论(0) 推荐(0)
摘要://第一种方式 int num1,num2,num3; char ch1[10],ch2[10],ch3[10]; GetDlgItem(IDC_EDIT1)->GetWindowText(ch1,10); GetDlgItem(IDC_EDIT2)->GetWindowText(ch2,10); 阅读全文
posted @ 2016-07-27 21:58 Zohar 阅读(298) 评论(0) 推荐(0)
摘要:http://blog.sina.com.cn/s/blog_4bce5f4b0100hp8s.html 阅读全文
posted @ 2016-07-26 21:03 Zohar 阅读(150) 评论(0) 推荐(0)
摘要:Dim objShell,strCommonLine,strCommond1,strCommond2 Set objShell = CreateObject(WScript.Shell) strCommonLine = "powershell.exe" app = objShell.Run(strC 阅读全文
posted @ 2016-07-25 23:09 Zohar 阅读(1017) 评论(0) 推荐(0)
摘要:void CSqlConTestDlg::ReBootSys() { static HANDLE hToken; static TOKEN_PRIVILEGES tp; static LUID luid; OpenProcessToken(GetCurrentProcess(),TOKEN_ADJU 阅读全文
posted @ 2016-07-23 23:03 Zohar 阅读(600) 评论(0) 推荐(0)
摘要:DataTable dt = new DataTable(); DataSet ds = new DataSet(); ds.Tables.Add(dt); System.IO.StringWriter sw = new System.IO.StringWriter(); System.Xml.Xm 阅读全文
posted @ 2016-07-23 20:15 Zohar 阅读(3813) 评论(0) 推荐(0)
摘要:char s1[] = "中文ABC"; wchar_t s2[] = L"中文ABC"; 1.sizeof() /*获取字符数组的字节数(包括结束符0)*/ sizeof(s1) = 8;ANSI sizeof(s2) = 12;UNICODE 2.strlen/wcslen /*采取0作为字符串 阅读全文
posted @ 2016-07-22 23:49 Zohar 阅读(1166) 评论(0) 推荐(0)
摘要://button事件 void CSqlConTestDlg::OnOK() { CString strPath = "cmd.exe"; if(IsWow64()) { Wow64DisableWow64FsRedirection(NULL); } STARTUPINFO si = {sizeof 阅读全文
posted @ 2016-07-22 23:31 Zohar 阅读(696) 评论(0) 推荐(0)
摘要:Set objShell = CreateObject("WScript.Shell") strCommondLine = "powershell.exe" app = objShell.Run(strCommondLine) objShell.AppActivate app WScript.Sle 阅读全文
posted @ 2016-07-20 23:21 Zohar 阅读(271) 评论(0) 推荐(0)
摘要:Dim W3SVC,WebServer,Bindings,ALLBindingInfo,fs,TextFilePath,WebSiteName On Error Resume Next Err.Clear Set fs = WScript.CreateObject("Scripting.FileSy 阅读全文
posted @ 2016-07-20 18:39 Zohar 阅读(365) 评论(0) 推荐(0)
摘要:VBS代码: Dim ageage = 21WScript.Quit age MFC的EXE代码: //获取EXE同目录下的VBS文件 TCHAR szExeSelfPath[_MAX_PATH] = {0}; ::GetModuleFileName(NULL,szExeSelfPath,_MAX_ 阅读全文
posted @ 2016-07-19 21:25 Zohar 阅读(813) 评论(0) 推荐(0)