// smsgroupsendView.cpp : implementation of the CSmsgroupsendView class
//#include "stdafx.h"
#include "smsgroupsend.h"#include "smsgroupsendDoc.h"
#include "smsgroupsendView.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif/////////////////////////////////////////////////////////////////////////////
// CSmsgroupsendViewIMPLEMENT_DYNCREATE(CSmsgroupsendView, CFormView)BEGIN_MESSAGE_MAP(CSmsgroupsendView, CFormView)
//{{AFX_MSG_MAP(CSmsgroupsendView)
ON_BN_CLICKED(IDC_BUTTON1, OnGroupSend)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
// CSmsgroupsendView construction/destructionCSmsgroupsendView::CSmsgroupsendView()
: CFormView(CSmsgroupsendView::IDD)
{
//{{AFX_DATA_INIT(CSmsgroupsendView)
m_SendMsin = _T("");
//}}AFX_DATA_INIT
// TODO: add construction code here
}CSmsgroupsendView::~CSmsgroupsendView()
{
}void CSmsgroupsendView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSmsgroupsendView)
DDX_Control(pDX, IDC_LIST2, m_SendList);
DDX_Control(pDX, IDC_LIST1, m_ManageList);
DDX_Control(pDX, IDC_TREE1, m_GroupTree);
DDX_Text(pDX, IDC_SENDMSIN, m_SendMsin);  //}}AFX_DATA_MAP
}BOOL CSmsgroupsendView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs
////////
return CFormView::PreCreateWindow(cs);
}void CSmsgroupsendView::OnInitialUpdate()
{
// UpdateData(FALSE);
///////
CFormView::OnInitialUpdate();

ChangePattern();
//
// UpdateData(FALSE);
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
///////
}/////////////////////////////////////////////////////////////////////////////
// CSmsgroupsendView printingBOOL CSmsgroupsendView::OnPreparePrinting(CPrintInfo* pInfo)
{ // default preparation
return DoPreparePrinting(pInfo);
}void CSmsgroupsendView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// before printing
}void CSmsgroupsendView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}void CSmsgroupsendView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}/////////////////////////////////////////////////////////////////////////////
// CSmsgroupsendView diagnostics#ifdef _DEBUG
void CSmsgroupsendView::AssertValid() const
{
CFormView::AssertValid();
}void CSmsgroupsendView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}CSmsgroupsendDoc* CSmsgroupsendView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSmsgroupsendDoc)));
return (CSmsgroupsendDoc*)m_pDocument;
}
#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////
// CSmsgroupsendView message handlersBOOL CSmsgroupsendView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
{ // TODO: Add your specialized code here and/or call the base class
return CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}void CSmsgroupsendView::OnGroupSend() 
{
// TODO: Add your control notification handler code here

  ChangePattern();}void CSmsgroupsendView::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) 
{
// TODO: Add your specialized code here and/or call the base class
/////
CFormView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}void CSmsgroupsendView::ChangePattern()
{
   m_ManageList.SetExtendedStyle(LVS_EX_FULLROWSELECT | //允许整行选中
LVS_EX_GRIDLINES | //画出网格线
LVS_EX_ONECLICKACTIVATE | //单击选中表项
LVS_EX_FLATSB ); //扁平风格的滚动条
   m_ManageList.InsertColumn(0,"用户名",LVCFMT_LEFT,48,0);
m_ManageList.InsertColumn(1,"手机号",LVCFMT_LEFT,100,1);
//   m_ManageList.RedrawWindow(NULL,NULL,RDW_UPDATENOW);
m_ManageList.UpdateData(TRUE); m_SendList.SetExtendedStyle(LVS_EX_FULLROWSELECT | //允许整行选中
LVS_EX_GRIDLINES | //画出网格线
LVS_EX_ONECLICKACTIVATE | //单击选中表项
LVS_EX_FLATSB );
m_SendList.InsertColumn(0,"用名名",LVCFMT_LEFT,48,0);
m_SendList.InsertColumn(1,"手机号",LVCFMT_LEFT,100,1);
    m_SendList.InsertColumn(2,"发送状态",LVCFMT_LEFT,100,2);
m_SendList.UpdateData(TRUE);
//    RedrawWindow(NULL,NULL,RDW_UPDATENOW);
}
为何没有变化(控件中)