VC
文章平均质量分 74
ghosthhh
这个作者很懒,什么都没留下…
展开
-
CListCtrl
一、使CListCtrl能够编辑子项1、在对话框中添加一个CListCtrl控件,并添加CListCtrl类型的变量m_list。2、初始化控件设置控件风格(照抄网上的)LONG lStyle;lStyle = GetWindowLong(m_list.m_hWnd, GWL_STYLE);//获取当前窗口stylelStyle |= LVS_REPORT; //设置sty原创 2012-07-12 17:04:07 · 628 阅读 · 0 评论 -
DLL文件(未完结)
DLL文件内使用对话框资源AFX_MANAGE_STATE(AfxGetStaticModuleState()); 头文件#ifndef API_EXPORT_HEAD_H#define API_EXPORT_HEAD_Hcode#endif#define API_EXPORT_HEAD_H原创 2012-08-23 10:21:41 · 218 阅读 · 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 · 606 阅读 · 0 评论 -
VC2010操作EXCEL
环境:Windows7Microsoft Visual Studio 2010Microsoft Office Excel 2003/20101. 新建VC工程2. 添加Excel类库在工程名上右键,选择增加->类,选择TypeLib中的MFC类(类向导中同样可以添加)添加以下类CApplication CWo原创 2013-02-05 14:44:54 · 2267 阅读 · 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 · 262 阅读 · 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 · 307 阅读 · 0 评论 -
VC项目路径设置
C/C++->Preprocessor->addtional includedirectoies->../includelink->general->output file name->../bin_d/UDPCon.dlllink->additional library path->../lib_dgeneral->output directories->output files->原创 2012-07-13 09:15:32 · 378 阅读 · 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 · 380 阅读 · 0 评论 -
自定义工具栏
图标按钮m_imageList.Create(32,32,ILC_COLOR24|ILC_MASK,1,1);m_imageList.Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME));按钮IDUINT array[2];array[0] = ID_SYS_START;m_toolbar.Create(this);m_toolba原创 2012-07-12 17:00:07 · 391 阅读 · 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 · 392 阅读 · 0 评论 -
Win32串口编程
Win32串口编程 http://www.vckbase.com/index.php/wv/1439转载 2012-07-27 10:19:01 · 249 阅读 · 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 · 3059 阅读 · 1 评论