摘要: 方法一:有test.h,test1.c,test2.c,main.c,其中:1 // main.c2 #include "test.h"3 4 void main(){5 test1();6 test2(); 7 }生成.so: gcc test1.c te... 阅读全文
posted @ 2015-01-28 21:10 星羽晨 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 1 void CStockServerDlg::ErrorExit(LPTSTR lpszFunction) //错误函数 2 { 3 // Retrieve the system error message for the last-error code 4 5 LPVO... 阅读全文
posted @ 2015-01-23 16:32 星羽晨 阅读(598) 评论(0) 推荐(0) 编辑
摘要: CSocket从 CAsyncSocket比派生,继承其 Windows 套接字 API 的封装,表示较高级别的抽象 CAsyncSocket 对象AfxSocketInit() 这个函数,在使用CSocket前一定要先调用该函数,否则使用CSocket会出错;并且该函数还有一个重要的使用方式, 就... 阅读全文
posted @ 2015-01-22 23:14 星羽晨 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 1 // StockSrv.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 #include 7 #include 8 #pragma comment(lib,"Ws2_32.lib") //fatal e... 阅读全文
posted @ 2015-01-10 15:21 星羽晨 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 1 explicit CFileDialog( 2 BOOL bOpenFileDialog, 指定的参数创建哪种类型的对话框。 设置到构造 文件已打开 对话框的 TRUE。 设置到构造 保存文件 对话框的 FALSE。 3 LPCTSTR lpszDefExt = NULL,... 阅读全文
posted @ 2014-12-30 20:25 星羽晨 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: 1.创建属性页2.双击属性页添加Prop类,基类为:CPropertyPage3.工程右键->添加->类->MFC类在CPropSheet类中添加成员变量:public:CProp1m_prop1;CProp2m_prop2;CProp3m_prop3;在CPropSheet类中添加相应的头文件:#... 阅读全文
posted @ 2014-12-26 20:22 星羽晨 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 一.在ResourceView选项卡的Menu下添加一个菜单资源二.在View的属性->消息->添加WM_CONTEXTMENU三.在View里添加如下代码: 1 void CTestView::OnContextMenu(CWnd* /*pWnd*/, CPoint point) 2 { 3 ... 阅读全文
posted @ 2014-12-24 21:50 星羽晨 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: 1.在头文件加上#ifndef _HEADERNAME_H#define _HEADERNAME_H//Input your code#endif 阅读全文
posted @ 2014-12-12 10:05 星羽晨 阅读(850) 评论(0) 推荐(0) 编辑
摘要: The SetupDiEnumDeviceInterfaces function enumerates the device interfaces that are contained in a device information set.BOOL SetupDiEnumDeviceInterfa... 阅读全文
posted @ 2014-12-12 09:59 星羽晨 阅读(1927) 评论(0) 推荐(0) 编辑
摘要: 1.新建一对话框:Ado,如图所示:控件listbox和button2.导入ADO库:在stdafx.h中导入该库1 #import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","r... 阅读全文
posted @ 2014-11-28 21:24 星羽晨 阅读(993) 评论(0) 推荐(0) 编辑