07 2011 档案
摘要:http://sourceforge.net/projects/com0com/The Null-modem emulator (com0com) is a kernel-mode virtual serial port driver for Windows. You can create an unlimited number of virtual COM port pairs and use any pair to connect one COM port based application to another.com0com是windows内核模式下的虚拟串口驱动程序。可以创建虚拟串口
阅读全文
摘要:CRect rect; GetDlgItem(IDC_IMG_NOTEPAD)->GetWindowRect(&rect);//获得空间的绝对坐标 ScreenToClient(&rect);//获得相对于主窗体的坐标 rect.OffsetRect(CSize(5,5));//这里要是要移动的相对位置 GetDlgItem(IDC_IMG_NOTEPAD)->MoveWindow(rect);//移动到目标位置
阅读全文
摘要://加载NotePad.exe的图标到IDC_IMG_NOTEPAD Cstatic控件上,这段代码显示不出ico图标,原因是什么?? //是type属性设置错了,在资源视图里面,编辑CStatic控件的属性,将它的Type改为icon,即解决。 SHFILEINFO fileInfo; DWORD_PTR dwRet=SHGetFileInfo("C:\\windows\\system32\\notepad.exe",0,&fileInfo,sizeof(SHFILEINFO),SHGFI_ICON); if (dwRet) { ((CStatic*)GetDlg
阅读全文
摘要://如果这个对话框通过非模态的方式被创建,由于在PostNcDestroy(对话框销毁会被调用)中使用了delete this;不会发生内存泄漏class CMessageDlg:public CDialog{public: void PostNcDestroy();};void CMessageDlg::PostNcDestroy(){ CDialog::PostNcDestroy(); delete this;}
阅读全文
摘要:Dr.com限制是如此的严格,以至于colinux连不上网。怎么办的?找到这个解决方案:http://ngc1976.yo2.cn/articles/cooperative-linux%E7%AE%80%E8%A6%81%E6%8C%87%E5%8D%97.html原来可以使用slirp方式解决Dr.com电脑上colinux上网的问题#example.conf中,选择使用下面的一种上网方式:eth0=slirp,,tcp:22:22/tcp:177:177/udp:177:177OK了!
阅读全文
摘要:fread,对指定长度的文件数据。读取的长度远小于文件的总长度,怎么回事呢?查MSDN,fopen最后一个参数:tOpen in text (translated) mode.In this mode, CTRL+Z is interpreted as an end-of-file character on input.In files opened for reading/writing with "a+", fopen checks for a CTRL+Z at the end of the file and removes it, if possible.This
阅读全文
浙公网安备 33010602011771号