这几天处理单文档中CListCtrl控件,找了不少资料。最后得到以下的使用技巧,记录下来,方便后面用得到。当然可能有不正确的地方,请大家指出。

问题一:修改网格的高度

方法1:直接在OnInitDialog()中添加以下代码:

//此处通过新建一个空白的图片将行高撑起来CImageList m_image;  m_image.Create(1,20,ILC_COLOR32,1,0);  m_HistoryRecordCtrl.SetImageList(&m_image, LVSIL_SMALL);  

方法2:备注(该方法不仅可以设置每行的高度,每行的颜色,还可以设置表头的颜色,功能比较全面。)

直接添加以下4个文件到项目中,然后调用其中的函数即可。

HeaderCtrlCl.h代码:

#pragma once// CHeaderCtrlCl
class CHeaderCtrlCl : public CHeaderCtrl
{DECLARE_DYNAMIC(CHeaderCtrlCl)
public:CHeaderCtrlCl();virtual ~CHeaderCtrlCl();protected:DECLARE_MESSAGE_MAP()public:afx_msg void OnPaint();CStringArray m_HChar;CString m_Format; //表示对齐类型的整型数组,0表示左对齐,1表示中间对齐,2表示右对齐
public:int m_R;int m_G;int m_B;int m_Gradient;  // 画立体背景,渐变系数float m_Height;  //表头高度,这是倍数,int m_fontHeight; //字体高度int m_fontWith;   //字体宽度COLORREF m_color;LRESULT OnLayout( WPARAM wParam, LPARAM lParam );
};

HeaderCtrlCl.cpp代码:

// HeaderCtrlCl.cpp : 实现文件
//#include "stdafx.h"
#include "WellPrintExp.h"
#include "HeaderCtrlCl.h"// CHeaderCtrlClIMPLEMENT_DYNAMIC(CHeaderCtrlCl, CHeaderCtrl)CHeaderCtrlCl::CHeaderCtrlCl()
: m_R(255)
, m_G(255)
, m_B(255)
, m_Gradient(8)
{m_Format = "";m_Height = 1;m_fontHeight = 15;m_fontWith = 0;m_color = RGB(0,0,0);
}CHeaderCtrlCl::~CHeaderCtrlCl()
{
}BEGIN_MESSAGE_MAP(CHeaderCtrlCl, CHeaderCtrl)ON_WM_PAINT()ON_MESSAGE(HDM_LAYOUT, OnLayout)
END_MESSAGE_MAP()// CHeaderCtrlCl 消息处理程序
void CHeaderCtrlCl::OnPaint()
{CPaintDC dc(this); // device context for painting// TODO: 在此处添加消息处理程序代码// 不为绘图消息调用 CHeaderCtrl::OnPaint()int nItem; nItem = GetItemCount();//得到有几个单元 for(int i = 0; i<nItem;i ++) { CRect tRect;GetItemRect(i,&tRect);//得到Item的尺寸int R = m_R,G = m_G,B = m_B;CRect nRect(tRect);//拷贝尺寸到新的容器中 nRect.left++;//留出分割线的地方 //绘制立体背景 for(int j = tRect.top;j<=tRect.bottom;j++) { nRect.bottom = nRect.top+1; CBrush _brush; _brush.CreateSolidBrush(RGB(R, G, B));//创建画刷 dc.FillRect(&nRect,&_brush); //填充背景 _brush.DeleteObject(); //释放画刷 R-=m_Gradient;G-=m_Gradient;B-=m_Gradient;if (R<0)R = 0;if (G<0)G = 0;if (B<0)B= 0;nRect.top = nRect.bottom; } dc.SetBkMode(TRANSPARENT);CFont nFont ,* nOldFont; //dc.SetTextColor(RGB(250,50,50)); dc.SetTextColor(m_color);nFont.CreateFont(m_fontHeight,m_fontWith,0,0,0,FALSE,FALSE,0,0,0,0,0,0,_TEXT("宋体"));//创建字体 nOldFont = dc.SelectObject(&nFont);UINT nFormat = 1;if (m_Format[i]=='0'){nFormat = DT_LEFT;tRect.left+=3;}else if (m_Format[i]=='1'){nFormat = DT_CENTER;}else if (m_Format[i]=='2'){nFormat = DT_RIGHT;tRect.right-=3;}//将文字显示在一个适合的高度位置TEXTMETRIC metric;dc.GetTextMetrics(&metric);int ofst = 0;ofst = tRect.Height() - metric.tmHeight;tRect.OffsetRect(0,ofst/2);dc.DrawText(m_HChar[i],&tRect,nFormat);dc.SelectObject(nOldFont); nFont.DeleteObject(); //释放字体 } //画头部剩余部分(没有标题的那部分)CRect rtRect;CRect clientRect;GetItemRect(nItem - 1,rtRect);GetClientRect(clientRect); //当前(CHeaderCtrl)控件的大小rtRect.left = rtRect.right+1;rtRect.right = clientRect.right;int R = m_R,G = m_G,B = m_B;CRect nRect(rtRect);//绘制立体背景 for(int j = rtRect.top;j<=rtRect.bottom;j++) { nRect.bottom = nRect.top+1; CBrush _brush; _brush.CreateSolidBrush(RGB(R,G,B));//创建画刷 dc.FillRect(&nRect,&_brush); //填充背景 _brush.DeleteObject(); //释放画刷 R-=m_Gradient;G-=m_Gradient;B-=m_Gradient;if (R<0)R = 0;if (G<0)G = 0;if (B<0)B= 0;nRect.top = nRect.bottom; }
}
LRESULT CHeaderCtrlCl::OnLayout( WPARAM wParam, LPARAM lParam )
{LRESULT lResult = CHeaderCtrl::DefWindowProc(HDM_LAYOUT, 0, lParam); HD_LAYOUT &hdl = *( HD_LAYOUT * ) lParam; RECT *prc = hdl.prc; WINDOWPOS *pwpos = hdl.pwpos; //表头高度为原来1.5倍,如果要动态修改表头高度的话,将1.5设成一个全局变量 int nHeight = (int)(pwpos->cy * m_Height);pwpos->cy = nHeight; prc->top = nHeight; return lResult;
}

ListCtrlCl.h代码:

#pragma once#include "HeaderCtrlCl.h"
// CListCtrlClclass CListCtrlCl : public CListCtrl
{DECLARE_DYNAMIC(CListCtrlCl)public:CListCtrlCl();virtual ~CListCtrlCl();protected:DECLARE_MESSAGE_MAP()virtual void PreSubclassWindow();
protected:virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
protected:CHeaderCtrlCl m_Header; //表头int m_nRowHeight;// 行高CPtrList m_ptrListCol;  //保存列颜色CPtrList m_ptrListItem; //保存Item颜色表CPtrList m_colTextColor; //保存列字体颜色CPtrList m_ItemTextColor; //保存单元格字体颜色COLORREF m_color;int m_fontHeight; // 字体高度int m_fontWith;         // 字体宽度
public:// 设置表头高度void SetHeaderHeight(float Height);// Gradient - 渐变系数,立体背景用,不用渐变设为0void SetHeaderBKColor(int R, int G, int B, int Gradient);int InsertColumn(int nCol, LPCTSTR lpszColumnHeading,int nFormat = LVCFMT_LEFT, int nWidth = -1, int nSubItem = -1);void SetHeaderFontHW(int nHeight,int nWith); //设置表头字体大小void SetHeaderTextColor(COLORREF color);void SetRowHeight(int nHeight); //设置行高bool FindColColor(int col ,COLORREF &color); //查找列颜色bool FindItemColor(int col,int row,COLORREF &color);bool FindColTextColor(int col,COLORREF &color); //查找列字体颜色bool FindItemTextColor(int col,int row,COLORREF &color);void SetColColor(int col,COLORREF color);  //设置列颜色//void SetColProgress(int col, CProgressCtrl progress, int prencent);void SetItemColor(int col,int row,COLORREF color); //设置Item颜色void SetColTextColor(int col,COLORREF color);   //设置列文本颜色void SetItemTextColor(int col,int row,COLORREF color);void SetTextColor(COLORREF cr);void SetFontHW(int nHeight,int nWith);  //设置字体的高和宽
};

ListCtrlCl.cpp代码:

// ListCtrlCl.cpp : 实现文件
//#include "stdafx.h"
#include "WellPrintExp.h"
#include "ListCtrlCl.h"struct stColor
{int nRow;int nCol;COLORREF rgb;
};
// CListCtrlClIMPLEMENT_DYNAMIC(CListCtrlCl, CListCtrl)CListCtrlCl::CListCtrlCl()
: m_nRowHeight(0)
, m_fontHeight(12)
, m_fontWith(0)
{m_color = RGB(0,0,0);
}CListCtrlCl::~CListCtrlCl()
{stColor *ptemp = NULL;while (m_ptrListCol.GetCount() > 0){ptemp = (stColor *)(m_ptrListCol.RemoveHead());if ( NULL != ptemp ){delete ptemp;ptemp = NULL;}}while ( m_ptrListItem.GetCount() > 0){ptemp = (stColor *)(m_ptrListItem.RemoveHead());if ( NULL != ptemp ){delete ptemp;ptemp = NULL;}}while ( m_colTextColor.GetCount() > 0){ptemp = (stColor *)(m_colTextColor.RemoveHead());if ( NULL != ptemp ){delete ptemp;ptemp = NULL;}}while ( m_ItemTextColor.GetCount() > 0){ptemp = (stColor *)(m_ItemTextColor.RemoveHead());if ( NULL != ptemp ){delete ptemp;ptemp = NULL;}}
}BEGIN_MESSAGE_MAP(CListCtrlCl, CListCtrl)ON_WM_MEASUREITEM_REFLECT()
END_MESSAGE_MAP()// CListCtrlCl 消息处理程序
void CListCtrlCl::PreSubclassWindow()
{// TODO: 在此添加专用代码和/或调用基类ModifyStyle(0,LVS_OWNERDRAWFIXED);CListCtrl::PreSubclassWindow();CHeaderCtrl *pHeader = GetHeaderCtrl();m_Header.SubclassWindow(pHeader->GetSafeHwnd());
}
void CListCtrlCl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{// TODO:  添加您的代码以绘制指定项TCHAR lpBuffer[256];LV_ITEM lvi;lvi.mask = LVIF_TEXT | LVIF_PARAM ;lvi.iItem = lpDrawItemStruct->itemID ; lvi.iSubItem = 0;lvi.pszText = lpBuffer ;lvi.cchTextMax = sizeof(lpBuffer);VERIFY(GetItem(&lvi));LV_COLUMN lvc, lvcprev ;::ZeroMemory(&lvc, sizeof(lvc));::ZeroMemory(&lvcprev, sizeof(lvcprev));lvc.mask = LVCF_WIDTH | LVCF_FMT;lvcprev.mask = LVCF_WIDTH | LVCF_FMT;CDC* pDC;pDC = CDC::FromHandle(lpDrawItemStruct->hDC);CRect rtClient;GetClientRect(&rtClient);for ( int nCol=0; GetColumn(nCol, &lvc); nCol++){if ( nCol > 0 ) {// Get Previous Column Width in order to move the next display itemGetColumn(nCol-1, &lvcprev) ;lpDrawItemStruct->rcItem.left += lvcprev.cx ;lpDrawItemStruct->rcItem.right += lpDrawItemStruct->rcItem.left; }CRect rcItem;   if (!GetSubItemRect(lpDrawItemStruct->itemID,nCol,LVIR_LABEL,rcItem))   continue;   ::ZeroMemory(&lvi, sizeof(lvi));lvi.iItem = lpDrawItemStruct->itemID;lvi.mask = LVIF_TEXT | LVIF_PARAM;lvi.iSubItem = nCol;lvi.pszText = lpBuffer;lvi.cchTextMax = sizeof(lpBuffer);VERIFY(GetItem(&lvi));CRect rcTemp;rcTemp = rcItem;if (nCol==0){//rcTemp.left -= 2;rcTemp.left += 5;}if ( lpDrawItemStruct->itemState & ODS_SELECTED ){pDC->FillSolidRect(&rcTemp, GetSysColor(COLOR_HIGHLIGHT)) ;pDC->SetTextColor(GetSysColor(COLOR_HIGHLIGHTTEXT)) ;}else{COLORREF color;color = GetBkColor();pDC->FillSolidRect(rcTemp,color);if (FindColColor(nCol,color)){pDC->FillSolidRect(rcTemp,color);}if (FindItemColor(nCol,lpDrawItemStruct->itemID,color)){pDC->FillSolidRect(rcTemp,color);}//pDC->SetTextColor(m_color);}pDC->SelectObject(GetStockObject(DEFAULT_GUI_FONT));UINT   uFormat    = DT_CENTER ;if (m_Header.m_Format[nCol]=='0'){uFormat = DT_LEFT;}else if (m_Header.m_Format[nCol]=='1'){uFormat = DT_CENTER;}else if (m_Header.m_Format[nCol]=='2'){uFormat = DT_RIGHT;}TEXTMETRIC metric;pDC->GetTextMetrics(&metric);int ofst;ofst = rcItem.Height() - metric.tmHeight;rcItem.OffsetRect(0,ofst/2);pDC->SetTextColor(m_color);COLORREF color;if (FindColTextColor(nCol,color)){pDC->SetTextColor(color);}if (FindItemTextColor(nCol,lpDrawItemStruct->itemID,color)){pDC->SetTextColor(color);}CFont nFont ,* nOldFont; nFont.CreateFont(m_fontHeight,m_fontWith,0,0,0,FALSE,FALSE,0,0,0,0,0,0,_TEXT("宋体"));//创建字体 nOldFont = pDC->SelectObject(&nFont);DrawText(lpDrawItemStruct->hDC, lpBuffer, strlen(lpBuffer), &rcItem, uFormat) ;pDC->SelectStockObject(SYSTEM_FONT) ;}
}
void CListCtrlCl::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
{if (m_nRowHeight>0){lpMeasureItemStruct->itemHeight = m_nRowHeight;}
}
int CListCtrlCl::InsertColumn(int nCol, LPCTSTR lpszColumnHeading, int nFormat /* = LVCFMT_LEFT */, int nWidth /* = -1 */, int nSubItem /* = -1 */)
{//m_TaskListCtrl.InsertColumn(0, strShow, LVCFMT_LEFT, 200);m_Header.m_HChar.Add(lpszColumnHeading);if (nFormat==LVCFMT_LEFT){m_Header.m_Format = m_Header.m_Format + "0";}else if (nFormat==LVCFMT_CENTER){m_Header.m_Format = m_Header.m_Format + "1";}else if (nFormat==LVCFMT_RIGHT){m_Header.m_Format = m_Header.m_Format + "2";}else{m_Header.m_Format = m_Header.m_Format + "0";}return CListCtrl::InsertColumn(nCol,lpszColumnHeading,nFormat,nWidth,nSubItem);
}
// Gradient - 渐变系数,立体背景用,不用渐变设为0
void CListCtrlCl::SetHeaderBKColor(int R, int G, int B, int Gradient) //设置表头背景色
{m_Header.m_R = R;m_Header.m_G = G;m_Header.m_B = B;m_Header.m_Gradient = Gradient;
}
// 设置表头高度
void CListCtrlCl::SetHeaderHeight(float Height) //设置表头高度
{m_Header.m_Height = Height;
}
bool CListCtrlCl::FindColColor(int col,COLORREF &color) //查找列颜色
{int flag = 0;for (POSITION pos = m_ptrListCol.GetHeadPosition();pos!=NULL;){stColor *pColor = (stColor*)m_ptrListCol.GetNext(pos);if (pColor->nCol==col){flag = 1;color = pColor->rgb;break;}}if (1==flag){return true;}return false;
}
bool CListCtrlCl::FindItemColor(int col,int row,COLORREF &color) //查找颜色
{int flag = 0;for (POSITION pos = m_ptrListItem.GetHeadPosition();pos!=NULL;){stColor *pColor = (stColor*)m_ptrListItem.GetNext(pos);if (pColor->nCol==col&&pColor->nRow==row){flag = 1;color = pColor->rgb;break;}}if (1==flag){return true;}return false;
}
void CListCtrlCl::SetColColor(int col,COLORREF color) //设置列颜色
{stColor *pColor  = new stColor;pColor->nCol = col;pColor->rgb = color;m_ptrListCol.AddTail(pColor);
}
void CListCtrlCl::SetItemColor(int col,int row,COLORREF color) //设置格子颜色
{stColor *pColor  = new stColor;pColor->nCol = col;pColor->nRow = row;pColor->rgb = color;m_ptrListItem.AddTail(pColor);
}
void CListCtrlCl::SetRowHeight(int nHeight) // 设置行高
{m_nRowHeight = nHeight;CRect rcWin;GetWindowRect(&rcWin);WINDOWPOS wp;wp.hwnd = m_hWnd;wp.cx = rcWin.Width();wp.cy = rcWin.Height();wp.flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER;SendMessage(WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp);
}
void CListCtrlCl::SetHeaderFontHW(int nHeight,int nWith) //设置头部字体宽和高
{m_Header.m_fontHeight = nHeight;m_Header.m_fontWith = nWith;
}
void CListCtrlCl::SetHeaderTextColor(COLORREF color) //设置头部字体颜色
{m_Header.m_color = color;
}
void CListCtrlCl::SetTextColor(COLORREF cr)  //设置字体颜色
{m_color = cr;
}
void CListCtrlCl::SetFontHW(int nHeight,int nWith) //设置字体高和宽
{m_fontHeight = nHeight;m_fontWith = nWith;
}
void CListCtrlCl::SetColTextColor(int col,COLORREF color)
{stColor *pColor = new stColor;pColor->nCol = col;pColor->rgb = color;m_colTextColor.AddTail(pColor);
}
bool CListCtrlCl::FindColTextColor(int col,COLORREF &color)
{int flag = 0;for (POSITION pos = m_colTextColor.GetHeadPosition();pos!=NULL;){stColor *pColor = (stColor*)m_colTextColor.GetNext(pos);if (pColor->nCol==col){flag = 1;color = pColor->rgb;break;}}if (1==flag){return true;}return false;
}
bool CListCtrlCl::FindItemTextColor(int col,int row,COLORREF &color)
{int flag = 0;for (POSITION pos = m_ItemTextColor.GetHeadPosition();pos!=NULL;){stColor *pColor = (stColor*)m_ItemTextColor.GetNext(pos);if (pColor->nCol==col&&pColor->nRow==row){flag = 1;color = pColor->rgb;break;}}if (1==flag){return true;}return false;
}
void CListCtrlCl::SetItemTextColor(int col,int row,COLORREF color)
{stColor *pColor = new stColor;pColor->nCol = col;pColor->nRow = row;pColor->rgb = color;m_ItemTextColor.AddTail(pColor);
}//void CListCtrlCl::SetColProgress(int col, CProgressCtrl progress, int prencent)
//{
//  stColor *pColor = new stColor;
//  pColor->nCol = col;
//  progress.SetRange(0,100);
//  progress.SetPos(prencent);
//
//}

以上的方法也是在 别的地方看到的,我这边都做了验证的。

第一个的效果是:

第二个的效果是:

问题二:给列表控件添加右键菜单

1、按照创建单文档应用程序的步骤,创建项目Example1,在最后一步选择CFormView,其他的具体步骤这里不做说明。

2、在FormView对话框上添加一个List Control,ID为IDC_LIST_CONTROL,选择View属性为Report,然后添加变量为m_listControl。然后在Example01View.cpp的OnInitialUpdate()函数【注:该函数和对话框应用程序中的OnInitDialog函数有相同的效果,都是初始化函数】中对列表控件进行初始化,具体代码如下:

void CExample01View::OnInitialUpdate()
{CFormView::OnInitialUpdate();GetParentFrame()->RecalcLayout();ResizeParentToFit();LONG lStyle;lStyle = GetWindowLong(m_listControl.m_hWnd, GWL_STYLE); //获取当前窗口stylelStyle &= ~LVS_TYPEMASK;                                  //清除显示方式位lStyle |= LVS_REPORT;                                     //设置styleSetWindowLong(m_listControl.m_hWnd, GWL_STYLE, lStyle);//设置扩展风格DWORD dwStyle = m_listControl.GetExtendedStyle();dwStyle |= LVS_EX_FULLROWSELECT;                         //选中某行使整行高亮(只适用与report风格的listctrl)dwStyle |= LVS_EX_GRIDLINES;                               //网格线(只适用与report风格的listctrl)dwStyle |= WS_CLIPCHILDREN | WS_CHILD;dwStyle |= LVS_EX_ONECLICKACTIVATE;m_listControl.SetExtendedStyle(dwStyle);//添加4个表头标题m_listControl.InsertColumn(0, _T("第一列"), LVCFMT_LEFT, 100);m_listControl.InsertColumn(1, _T("第二列"), LVCFMT_LEFT, 100);m_listControl.InsertColumn(2, _T("第三列"), LVCFMT_LEFT, 100);m_listControl.InsertColumn(3, _T("第四列"), LVCFMT_LEFT, 100);
}

效果如下:

3、要添加菜单,则要在资源文件中插入菜单。

此处插入菜单的名称为:IDR_MENU_FOR_LIST

然后在List Control上右键添加消息响应函数NM_RCLICK,在代码中生成

ON_NOTIFY(NM_RCLICK, IDC_LIST_CONTROL, &CExample01View::OnNMRClickListControl)

然后在OnNMRClickListControl函数中添加如下代码:

void CExample01View::OnNMRClickListControl(NMHDR *pNMHDR, LRESULT *pResult)
{LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);// TODO: 在此添加控件通知处理程序代码*pResult = 0;CMenu menuSystem;menuSystem.LoadMenu(IDR_MENU_FOR_LIST);CMenu *pPopup = menuSystem.GetSubMenu(0);CPoint myPoint;GetCursorPos(&myPoint);SetForegroundWindow();PostMessage(WM_NULL, 0);//显示右键菜单,由视图类窗口拥有。pPopup->TrackPopupMenu(TPM_LEFTALIGN, myPoint.x, myPoint.y, this);
}

显示效果如下:

问题三:添加列数据

1、对表格添加数据,只需要添加如下代码即可。

void CExample01View::UpdateListData()
{m_listControl.SetRedraw(FALSE);m_listControl.InsertItem(0,_T(""),0);m_listControl.SetItemText(0,0,_T("用户名0"));m_listControl.SetItemText(0,1,_T("用户名1"));m_listControl.SetItemText(0,2,_T("用户名2"));m_listControl.SetItemText(0,3,_T("用户名3"));m_listControl.InsertItem(1,_T(""),1);m_listControl.SetItemText(1,0,_T("用户名3"));m_listControl.SetItemText(1,1,_T("用户名2"));m_listControl.SetItemText(1,2,_T("用户名0"));m_listControl.SetItemText(1,3,_T("用户名1"));m_listControl.InsertItem(2,_T(""),2);m_listControl.SetItemText(2,0,_T("用户名1"));m_listControl.SetItemText(2,1,_T("用户名0"));m_listControl.SetItemText(2,2,_T("用户名3"));m_listControl.SetItemText(2,3,_T("用户名2"));m_listControl.SetRedraw(TRUE);
}

显示效果如下:

CListCtrl控件使用技巧相关推荐

  1. MFC第一课 控件使用技巧

    MFC控件使用技巧:Static Text 1)单独设置某个静态文本控件的属性: 颜色,字体大小 解决方案:需要指定一个独特的ID,默认情况下,所有的 静态文本框的ID是一致的 2)设置按钮的文本的时 ...

  2. MFC CListCtrl控件基本使用图解

    新建一个对话框工程:添加CListCtrl控件:为控件添加成员变量,如下图: 成员变量名称,m_ctrllist: 如下图,找到对话框初始化成员函数,转到定义,进入此函数代码: 找到 // TODO: ...

  3. CListCtrl控件

    CListCtrl控件在数据库编程中是用得比较多的控件之一,也是Window控件中较难掌握的一个控件.他可以有四显示方式 1:报告显示方式 在Report方式中,列表控件的显示方式是有行和列的,行有叫 ...

  4. VC MFC列表视图(CListCtrl)控件

    VC MFC列表视图(CListCtrl)控件 列表视图控件 图标风格 CListCtrl类里要了解的函数 SetImageList为列表控件关联一个图像列表 InsertItem插入一项 GetSe ...

  5. MFC_C++02_模态对话框,非模态对话框,StaticText静态文本,CEditCtrl控件,ComboBox下拉框,CListCtrl控件,CTreeCtrl 树控件,TabCtrl标签控件

    01 模态对话框创建 更改标题名: 菜单栏 --> 视图->工具箱 ,找到工具箱 导入两个按钮: 准备对话框: 插入就可以了,更改名称 双击按钮,可以进入点击事件 创建控件的类:右击-&g ...

  6. Powerbuilder中Kodak图像扫描控件应用技巧

    Powerbuilder中Kodak图像扫描控件应用技巧 作者:佚名   减小字体 增大字体 摘  要 Powerbuilder中对Kodak图像扫描控件应用的技巧,主要是对扫描出来的图像进行文件头修 ...

  7. CListCtrl控件中InsertItem和SettItemtext函数的用法简介

    本人初次用CListCtrl控件的时候,对于 InsertItem和SetrtItemtext两个函数的作用始终不是太懂,比如如果不先调用InsertItem这个函数,后面的InsertItemtex ...

  8. CListCtrl控件中InsertItem和SetItemText函数

         本人初次用CListCtrl控件的时候,对于 InsertItem和SetItemText两个函数的作用始终不是太懂,比如如果不先调用InsertItem这个函数,后面的SetItemT ...

  9. CListCtrl控件的InsertItem和SetItemText和SetItem三个函数的区别

    CListCtrl控件的InsertItem和SetItemText和SetItem三个函数的区别 分类: vc 2013-03-17 08:21  1548人阅读  评论(0)  收藏  举报 本人 ...

最新文章

  1. html脱离标准文档流,关于css脱离标准文档流的两种方式
  2. python 绘制折线图-怎样用python绘制折线图
  3. 如何自动化安装字体(命令行批量)
  4. 【C#学习笔记】函数调用
  5. c语言数字和字母输出的,请问这个用c怎么做:输入一串字符,分别统计其中数字和字母的个数...
  6. 千方科技的中场战事:选择、进化与野望
  7. 50个常用sql语句 网上流行的学生选课表的例子
  8. 原码,反码,补码的表示范围总结
  9. 今日你以老师为荣,明日老师以你为荣!
  10. c语言编程编写笑脸,用C语言编写笑脸游戏.doc
  11. NRF24L01 2.4G无线模块浅析(学习笔记)
  12. 软件创新实验室:微信小程序开发——音频录制与播放
  13. android wifi 打印文件,Android中的wifi打印
  14. 工作流待办事项消息提醒
  15. openwrt多wan限上下行速脚本,基于qosv4,imq模块替换成ifb模块
  16. Theorem、Proposition、Lemma和Corollary等的解释与区别
  17. 在Idea解决找不到sun.misc.BASE64Encoder及sun.misc.BASE64Decoder找不到包
  18. 2021-06-01太极图实现(定位+动画)
  19. 720phi10p 和 720p有什么区别_很多人都在都使用视频采集卡,那视频采集卡有几种?有什么特点和区别?...
  20. 实验三+163+张玉洁

热门文章

  1. 64安装oracle 9i,redhat 4.7 x86_64安装oracle 9i到17% copying naeet.o无响应
  2. 计算器(妈妈再也不用担心我的学习)
  3. 大数据基础之JAVA生成随机数案例
  4. Python实现逻辑回归实战(完整版)--内附详细代码
  5. 名词一大堆,充实其思想,鼓舞其斗志
  6. 新浪微博简单搜索接口
  7. windows下值得使用的软件整理——效率类
  8. R语言基于ems包标准化死亡率 (SMR)计算(1)
  9. OpenI入门-自己动手new一个Project
  10. TPC-H(二):22个SQL语句说明(基于TPC-H2.17.3版本)