![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
VC
文章平均质量分 74
ghosthhh
这个作者很懒,什么都没留下…
展开
-
CListCtrl
一、使CListCtrl能够编辑子项 1、在对话框中添加一个CListCtrl控件,并添加CListCtrl类型的变量m_list。 2、初始化控件 设置控件风格(照抄网上的) LONG lStyle; lStyle = GetWindowLong(m_list.m_hWnd, GWL_STYLE);//获取当前窗口style lStyle |= LVS_REPORT; //设置sty原创 2012-07-12 17:04:07 · 630 阅读 · 0 评论 -
DLL文件(未完结)
DLL文件内使用对话框资源 AFX_MANAGE_STATE(AfxGetStaticModuleState()); 头文件 #ifndef API_EXPORT_HEAD_H #define API_EXPORT_HEAD_H code #endif #define API_EXPORT_HEAD_H原创 2012-08-23 10:21:41 · 221 阅读 · 0 评论 -
拆分窗口
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) { //return m_wndSplitter.Create(this, // 2, 2, // TODO: 调整行数和列数 // CSize(10, 10), // TODO: 调整最原创 2013-02-05 15:10:01 · 608 阅读 · 0 评论 -
VC2010操作EXCEL
环境: Windows7 Microsoft Visual Studio 2010 Microsoft Office Excel 2003/2010 1. 新建VC工程 2. 添加Excel类库 在工程名上右键,选择增加->类,选择TypeLib中的MFC类(类向导中同样可以添加) 添加以下类 CApplication CWo原创 2013-02-05 14:44:54 · 2279 阅读 · 0 评论 -
TCP
服务器 // server.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; int main(int argc, char* argv[]) { WSADATA wsaData; if(0!原创 2012-09-17 23:13:21 · 268 阅读 · 0 评论 -
VC时间
精确到秒 CString strTime; CTime t = CTime::GetCurrentTime(); strTime = t.Format("%Y-%m-%d\t%H:%M:%S\t"); 精确到毫秒 CString strTime; SYSTEMTIME systime; GetSystemTime(&systime); strTime.For原创 2012-08-23 10:24:50 · 311 阅读 · 0 评论 -
VC项目路径设置
C/C++->Preprocessor->addtional includedirectoies->../include link->general->output file name->../bin_d/UDPCon.dll link->additional library path->../lib_d general->output directories->output files->原创 2012-07-13 09:15:32 · 384 阅读 · 0 评论 -
struct对齐
默认情况下VC会将结构体对齐,如 typedef struct _tag_forward_sensor_data { char cChannelNO; char cSensorNO; long lValue; char cType; }SENSOR, *LPSENSOR; 会占用12个字节, 实际使用7个字节. 内存数据 01 01原创 2012-09-21 11:26:54 · 381 阅读 · 0 评论 -
自定义工具栏
图标按钮 m_imageList.Create(32,32,ILC_COLOR24|ILC_MASK,1,1); m_imageList.Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME)); 按钮ID UINT array[2]; array[0] = ID_SYS_START; m_toolbar.Create(this); m_toolba原创 2012-07-12 17:00:07 · 394 阅读 · 0 评论 -
UDP连接
WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested = MAKEWORD( 2, 2 ); err = WSAStartup( wVersionRequested, &wsaData ); if ( err != 0 ) { return FALSE; }原创 2012-08-23 10:03:49 · 416 阅读 · 0 评论 -
Win32串口编程
Win32串口编程 http://www.vckbase.com/index.php/wv/1439转载 2012-07-27 10:19:01 · 251 阅读 · 0 评论 -
teechart
// 坐标轴 CAxes axes = m_tchart.get_Axis(); CAxis axisBottom = axes.get_Bottom(); axisBottom.SetMinMax(1520, 1570); CAxis axisLeft = axes.get_Left(); axisLeft.SetMinMax(-100, -10); //标题栏 CTitles title =原创 2013-02-05 15:13:43 · 3070 阅读 · 1 评论