没有合适的资源?快使用搜索试试~ 我知道了~
一个VC语句问题
资源推荐
资源详情
资源评论
void COutlookList::AddButton(LPCSTR Btntext,UINT uID)
{
int index = m_pButton.Add(new CListButton);
((CListButton*)m_pButton[m_pButton.GetSize()-1])->Create(Btntext,WS_CHILD,GetAddButtonRect(),this,uID);
((CListButton*)m_pButton[m_pButton.GetSize()-1])->m_Index = index;
((CListButton*)m_pButton[m_pButton.GetSize()-1])->ShowWindow(SW_SHOW);
m_ButtonCount+=1;
}
CListButton是一个类名
m_pButton 是按钮数组。
((CListButton*)m_pButton[m_pButton.GetSize()-1])->Create(Btntext,WS_CHILD,GetAddButtonRect(),this,uID);
这个语句是什么意思。
(CListButton*)我以前没有注意到类名加*号还有()
我就是不明白(CListButton*)是什么意思?
(这是这个函数所在的原文件COutlookList)
// OutlookList.cpp : implementation file
//
#include "stdafx.h"
#include "OutInterface.h"
#include "OutlookList.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COutlookList
COutlookList::COutlookList()
: m_ButtonHeight (30),m_ButtonCount(0)
{
m_LeftMargin = 70;
pItemDlbFun = NULL;
}
COutlookList::~COutlookList()
{
//m_pButton.RemoveAll();
int m = m_pButton.GetSize();
for (int i = 0; i<m_pButton.GetSize();i++)
{
((CButton*)m_pButton[i])->DestroyWindow();
delete ((CButton*)m_pButton[i]);
}
}
BEGIN_MESSAGE_MAP(COutlookList, CListCtrl)
//{{AFX_MSG_MAP(COutlookList)
ON_WM_CREATE()
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COutlookList
COutlookList::COutlookList()
: m_ButtonHeight (30),m_ButtonCount(0)
{
m_LeftMargin = 70;
pItemDlbFun = NULL;
}
COutlookList::~COutlookList()
{
//m_pButton.RemoveAll();
int m = m_pButton.GetSize();
for (int i = 0; i<m_pButton.GetSize();i++)
{
((CButton*)m_pButton[i])->DestroyWindow();
delete ((CButton*)m_pButton[i]);
}
}
BEGIN_MESSAGE_MAP(COutlookList, CListCtrl)
//{{AFX_MSG_MAP(COutlookList)
ON_WM_CREATE()
剩余14页未读,继续阅读
资源评论
momomowere
- 粉丝: 6
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功