⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 childview.cpp

📁 wince下交警执法程序源码,使用evc编写
💻 CPP
字号:
// ChildView.cpp : implementation of the CChildView class
//

#include "stdafx.h"
#include "TrafficExecLaw.h"
#include "ChildView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CChildView

CChildView::CChildView()
{
}

CChildView::~CChildView()
{
}


BEGIN_MESSAGE_MAP(CChildView,CWnd )
	//{{AFX_MSG_MAP(CChildView)
	ON_WM_CREATE()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CChildView message handlers

BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs) 
{
	if (!CWnd::PreCreateWindow(cs))
		return FALSE;

	cs.style &= ~WS_BORDER;
	cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS, 
		NULL, HBRUSH(COLOR_WINDOW+1), NULL);

	return TRUE;
}




int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CWnd ::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here

	RECT rect;

	rect.right =lpCreateStruct->cx;
	rect.bottom =lpCreateStruct->cy;
	rect.left =0;
	rect.top =0;

    m_FuncList.Create(
    WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_ICON|WS_DISABLED,
    rect,this,-1);

    CImageList *pImgList=new CImageList;
	if(pImgList){
	
		pImgList->Create (IDB_BITMAP_FUNCS,32,8,RGB(255,255,255));
		this->m_FuncList.SetImageList (pImgList,LVSIL_NORMAL);
	}


	TCHAR *funcsDescs[]=
	{
		    L"法律文书",
			L"日志",
			L"交通执法",
			L"车辆查询",
			L"信息管理",
			L"电话",
			L"地图",
			L"工具"
	};


	for(int i=0;i<sizeof(funcsDescs)/sizeof(char*);i++)
	{
		this->m_FuncList.InsertItem (i, funcsDescs[i],i);
	}




	return 0;
}

void CChildView::OnSize(UINT nType, int cx, int cy) 
{
	CWnd ::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	this->m_FuncList.SetWindowPos (NULL,0,0,cx,cy,0);
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -