NoPARKINGANYTIMEEXITONLY

迪士尼中国官网
迪士尼资讯
闪闪发光的贴钻,加上标志性的米妮蝴蝶结、白手套元素,无论什么场合都能让你成为全场焦点!你最喜欢哪一双呢?
让米奇和他的朋友们有着不同以往的风格体验
时钟管家葛士华和茶煲太太等角色瞬间变身单肩包、水桶包,包身还有各种影片中的经典元素,是不是很想剁手呢!
DISNEY x COACH 全新合作系列全球上市,作为两个品牌间的第三次合作
关注我们的微博
关注我们的微信
Disney | Pixar All rights reserved. 备案号:沪ICP备号-17No Parking Anytime Signs – Made to LastCurrently Javascript is disabled in your browser, so please enable it. Check
in various browsers. *
* <button type="submit" name="btnlogin" id="btnlogin" value=" Login"
class="btn btn-primary btn-sm login_btn" > LoginNEW TO dsignsProduct InformationCheckoutLoading...Size 450x300mmQuantity Material
Aluminium CompositeReflective
NoClass 1Class 2Arrow
Double ArrowsLeft ArrowRight ArrowTotal (Incl. GST)$ 38.28Please enter PostcodeSuburb is required.Select Available Shipping TypesTotal (Incl. GST)$ 38.28&TC428- No Parking Anytime&Traffic SignOur Traffic&Signs are manufactured with a Protective UV Laminate which guards against abrasive environments, most chemicals and fading from the sun.Production Time-Frame 7-10 working days.Pricing is Plus GST.&Pricing does not include freight.Need more information?Phone 03 8.30am to 5.00pm Mon - FriOne of our friendly staff will be happy to assist!Or send us an email:&
Copyright (C)2018 Dsigns. All Rights Reserved.no parking at any time quot sign 400 x 300mmBahco Tekno+ Parallel Slotted Screwdriver 5.5mm x 300mm Round Shank&6.86Bahco Tekno+ Pozidriv Screwdriver 2.pt x 300mm Round Shank&9.20Bradstone Ancestry Paving Slabs Abbey Original 300 x 300mm&150.52Bradstone Ancestry Paving Slabs Abbey Storm 300 x 300mm&150.52Bradstone Ancestry Paving Slabs Abbey Storm 600 x 300mm&230.02Bradstone Carpet Stones Charcoal Straight 1200 X 400 Individual&29.68Bradstone Carpet Stones Rustic Red Straight 1200 X 400 Individual&29.68DeWalt Extreme 2 SDS-Plus Drillbit 12.0 x 300mm&4.59DeWalt Extreme 2 SDS-Plus Drillbit 14.0 x 300mm&5.93Denso Tape Flashing Tape 10m x 300mm Grey&26.68Evo-Stik Roll Grey Flashband 300mm x 10m 220003&20.34Faithfull Brick Bolster 75mm x 300mm (3in x 12in)&4.96Faithfull Cable Ties (100) Black 300mm X 4.8mm&2.94Faithfull Cable Ties (100) White 300mm X 4.8mm&2.94Faithfull Hacksaw Blades 300mm x 18tpi (Pack of 2)&1.76Faithfull Hacksaw Blades 300mm x 24tpi (Pack of 2)&1.76Faithfull Slotted Flared Soft Grip Screwdriver 300mm x 12mm&3.19Faithfull Standard Masonry Drill Bit 14 x 300mm&4.28Faithfull Standard Masonry Drill Bit 18 x 300mm&6.44Faithfull Standard Masonry Drill Bit 22 x 300mm&10.17Faithfull Standard Masonry Drill Bit 25 x 300mm&11.06Faithfull Standard Masonry Drill Bit 6.5 x 300mm&2.60Faithfull Standard Masonry Drill Bit 8 x 300mm&2.81ForgeFix Cable Tie Natural / Clear 4.8 x 300mm Box 100&2.93Genesis Mosaic Tile Mesh 300x300 - 300 x 300mm&2.95IRWIN Circular Saw Blade 400 x 30mm x 40T ATB&48.07IRWIN Circular Saw Blade 400 x 30mm x 60T ATB&52.19Irwin Speedhammer Max Drill Bit 12mm x 400/540mm&23.14Irwin Speedhammer Max Drill Bit 14mm x 400/540mm&26.72Irwin Speedhammer Max Drill Bit 15mm x 400/540mm&29.22Irwin Speedhammer Max Drill Bit 16mm x 400/540mm&29.13Irwin Speedhammer Max Drill Bit 18mm x 400/540mm&30.42Irwin Speedhammer Max Drill Bit 20mm x 400/520mm&33.43Irwin Speedhammer Max Drill Bit 22mm x 400/520mm&33.43Irwin Speedhammer Max Drill Bit 24mm x 400/520mm&36.90Irwin Speedhammer Max Drill Bit 25mm x 400/520mm&36.90Irwin Speedhammer Plus Drill Bit 12.0mm x 300mm&4.48Irwin Speedhammer Plus Drill Bit 13.0mm x 300mm&5.66Irwin Speedhammer Plus Drill Bit 14.0mm x 300mm&6.64Irwin Speedhammer Plus Drill Bit 15.0mm x 300mm&8.11Irwin Speedhammer Plus Drill Bit 18.0mm x 300mm&10.50Irwin Speedhammer Plus Drill Bit 20.0mm x 300mm&15.87Irwin Speedhammer Plus Drill Bit 22.0mm x 300mm&17.17Irwin Speedhammer Plus Drill Bit 24.0mm x 300mm&18.66Irwin Speedhammer Plus Drill Bit 26.0mm x 300mm&20.62Irwin Speedhammer Plus Drill Bit 6.0mm x 300mm&7.50Irwin Speedhammer Plus Drill Bit 8.0mm x 300mm&3.90Irwin Speedhammer Power Drill Bit 10mm x 300mm&7.39Irwin Speedhammer Power Drill Bit 16mm x 300mm&15.83Irwin Speedhammer Power Drill Bit 20mm x 300mm&29.02Marley Rivendale Slate Roof Tiles 600 x 300mm Blue Black&1.34Melco T47 Tommy Bar 5/8in Diameter x 300mm (12in)&3.94Monument 1517A Long Reach Magnetic Screwdriver 300mm x PH2&3.61Rawlplug 32 314 Impactor Masonry Drill 7mm x 300mm&3.16Rawlplug 32 320 Impactor Masonry Drill 10mm x 300mm&4.26Rawlplug 32 324 Impactor Masonry Drill 12mm x 300mm&4.71Rawlplug 32 332 Impactor Masonry Drill 16mm x 300mm&5.70Roughneck Concrete Chisel 16 x 300mm (5/8in x 12in)&5.34Scan Danger - PVC 200 x 300mm&5.75Scan Danger Deep Excavation - PVC 400 x 600mm&12.38Scan Danger Demolition In Progress - PVC 400 x 600mm&12.38Scan Danger Forklift Trucks - PVC 200 x 300mm&5.75Scan Danger Men At Work - PVC 200 x 300mm&5.75Scan Danger Men At Work - PVC 400 x 600mm&12.38Scan Danger Moving Vehicles - PVC 400 x 600mm&12.38Scan Danger Out Of Order - PVC 200 x 300mm&5.75Scan Danger Site Entrance - PVC 400 x 600mm&12.38Scan Eye Protection Must Be Worn - PVC 200 x 300mm&5.75Scan Fire Action Procedure - PVC 200 x 300mm SCA0178&5.75Scan Fire Door Keep Locked Shut - PVC 200 x 300mm&5.75Scan Fire Extinguisher - PVC 200 x 300mm&5.75Scan Fire Extinguisher Photoluminescent - 200 x 300mm&11.55Scan Fire Point - PVC 200 x 300mm&5.75Scan First Aid - PVC 200 x 300mm&5.75Scan Hazardous Area - PVC 400 x 600mm&12.38Scan Keep Out - PVC 200 x 300mm&5.75Scan Keep Out - PVC 400 x 600mm&12.38Scan No Entry - PVC 200 x 300mm&5.75Scan No Parking - PVC 200 x 300mm&5.75Scan No Parking - PVC 200 x 50mm&2.05Scan No Parking - PVC 400 x 600mm&12.38Scan No Smoking - PVC 200 x 300mm&5.75Scan No Smoking - PVC 200 x 300mm&5.75Scan No Smoking - PVC 400 x 600mm&12.38Scan No Smoking English / Welsh PVC 200 x 300mm&5.75Scan No Smoking It Is Against The Law To Smoke On These Premises - PVC 200 x 300mm&5.75Scan No Smoking On These Premises PVC 200 x 300mm&24.50Scan No Unauthorised Persons Beyond This Point - PVC 400 x 600mm&12.38Scan Protect Your Hands - PVC 200 x 300mm&5.75Scan Protective Footwear Must Be Worn - PVC 200 x 300mm&5.75Scan Strictly No Admittance - PVC 200 x 300mm&5.75Scan Strictly No Admittance To Unauthorised Persons - PVC 400 x 600mm&12.38Scan Warning CCTV Cameras In Operation - PVC 200 x 300mm&5.75Scan Warning Construction Site - PVC 200 x 300mm&5.75Scan Warning Wet Floor - PVC 200 x 300mm&5.75Stelrad Radiator K2 Double Panel 300mm X 2000mm 6701 BTU&73.68Stelrad Radiator K2 Double Panel 300mm X 500mm 1675 BTU&22.77Tumbled Limestone 400 x 400 Tiles - 400x400x12mm&69.95Tumbled Limestone 600 x 400 Tiles - 600x400x12mm&69.95Wera Kraftform 350 Screwdriver Phillips Tip PH2 x 300mm&5.41no parking at any time quot sign 400 x 300mmno parking at any time quot sign 400 x 300mm on other UK sites&10.95
This Scan Safety sign is made from 1mm thick, durable PVC. Its aggressive water-based adhesive enables the sign to easily stick on to and remain on any wall. It is printed using UV resistant inks, which resist fading. It is easy to read with clea...& &12.38
Designed and handcrafted in North Wales, the House Nameplate Company create beautiful signs and gifts, adding personality and style to your home. This No Parking sign is made from charcoal grey slate, with Times Roman font and hand painted in white. Fixings are provided.& &8.09
Sealey-Barriers-Sealey-PB391-Heavy-duty-tubular-steel-construction-barrier-Fitted-with-locking-pin-feature-to-secure-sign-in-upright-position-Supplied-with-three-securing-bolts-and-two-keys-For-full-security-we-suggest-you-drill-out-the-screw-head-after-installation-Sealey-PB391-No-Parking-Barrier& &20.15
The beauty of natural travertine combined with the hard-wearing durability of ceramic. Neutral grey tones and an attractive gloss finish make this cost-effective tile a perfect choice& &11.55
Australian Bodycare Any Time Balm 30ml: Express Chemist offer fast delivery and friendly, reliable service. Buy Australian Bodycare Any Time Balm 30ml online from Express Chemist today!& &14.50
Treat your skin to Australian Bodycares Any Time Balm, a creamy, emollient formula that works to soothe, smoothen and enrich the skin. Perfect for all skin types, particularly those suffering with uncomfortably dry skin, the moisturising blend combines antiseptic Tea Tree Oil with Bisabolol, Soya and Macadamia to deeply hydrate and condition deep down, leaving your skin feeling soft, supple and& &14.50
Treat your skin to Australian Bodycares Any Time Balm, a creamy, emollient formula that works to soothe, smoothen and enrich the skin. Perfect for all skin types, particularly those suffering with uncomfortably dry skin, the moisturising blend combines antiseptic Tea Tree Oil with Bisabolol, Soya and Macadamia to deeply hydrate and condition deep down, leaving your skin feeling soft, supple and& &14.50
Treat your skin to Australian Bodycares Any Time Balm, a creamy, emollient formula that works to soothe, smoothen and enrich the skin. Perfect for all skin types, particularly those suffering with uncomfortably dry skin, the moisturising blend combines antiseptic Tea Tree Oil with Bisabolol, Soya and Macadamia to deeply hydrate and condition deep down, leaving your skin feeling soft, supple and& &9.41
Puzzle consisting of 500 parts Dimensions: 48 x 34 x 0.5 cm Ideal for children from 10 years& &13.50
A rich creamy emollient balm for all skin types but especially good for blemished and dry flaking skin Containing several key active ingredients such as Tea Tree Oil, Bisabolol, Soya and macadamia making the formula unique and effective.Can be used ampldquoany timeamprdquo and for almost all skin conditionsVegan ampamp Vegetarian friendly Any Time Balm UsesLip balm,ampnbspCuticle care,ampnbspDry& &2.90
At Door furniture direct we sell high quality products at great value including Chrome Effect No Exit Sign in our Signs range. We also offer free delivery when you spend over GBP50.& &35.00
The Coffee Time Vintage Street Sign is a fun wall decoration suitable for use in the kitchen, conservatory or caf. Crafted from wood, the hand-finished monochrome sign features Coffee Time in black upper case 3D embossed lettering surrounded by a black border. The sign can be freestanding or hung on a wall. Wood Dimensions: H: 14cm x W: 80cm x D: 2.5cm& &14.95
A rustic slate sign to write all your DIY projects down on! You can personalise this hanging slate sign with a name up to 18 characters long. The words MAN SHED are fixed. You can then personalise with a message up to 18 characters in length. All personalisation is case sensitive and will appear as entered. The hanging sign has a piece of natural, rustic string which enables this item to be hung& no parking at any time quot sign 400 x 300mm on USA sites&#36;28.99
Sign Pre-punched mounting holes Weatherproof Says NO PARKING ANYTIME Aluminum 12& x 18& Material: Aluminum Color: Multi& &#36;6.79
& &#36;25.81
Bulldog Grooming Time Waits for No Man Time ages us all but now you can slow down that dreaded process with this Grooming Time Waits for No Man set from Bulldog. An effective moisturiser and eye cream duo, this set is sure to turn back time and have you looking your youthful self. This set contains the following products: Bulldog Anti-Ageing Moisturiser 100mlThis Anti-Ageing Moisturiser by& &#36;21.52
These classics will never fade, wear these with everything. ; Buckle at ankle closure. ; Man-made upper. ; Classic jelly construction. ; Man-made lining. ; Lightly padded footbed. ; Man-made sole. ; Imported. Measurements: ; Heel Height: 3 4 Weight: 7 Product measurements were taken using size 8, width M. Please note that measurements may vary by size.& &#36;32.99
IGR No-Bite&#8482; House Fogger provides effective long-term control and prevents reinfestation for 7 months. Kills adult and preadult fleas including flea eggs, cockroaches, spiders, ants, flies, mosquitoes, gnats, millipedes, lice, boxelder bugs, flying moths, hornets, carpenter bees, wasps, midges, silverfish, yellow-jackets, and ticks, including brown dog ticks and Gulf Coast ticks. Also kills& &#36;26.99
Wood sign with \California\ script painted on front with palm tree applique. Metal wire hanger. Approx dimensions: 4.5\ x 17.5\(13cm x 44cm). Imported.& &#36;115.49
The King Of Puppy Pads! When you absolutely need the most absorbent and tear resistant puppy training pad available, look no further than ValuePad ULTRA 23 x 24 34 gram 400ct Premium Puppy Training Pads. Made with a heavier top sheet and ultra-absorbent core, ValuePad Ultra will easily prevent leaks from small to medium sized doggie messes. The non-slip polypropylene backing will keep your& &#36;13.95
\Non-skid soles provide traction on smooth indoor surfaces, boat decks, etc. Protects hardwood floors and boat decks from damage caused by dogs. Indoor and outdoor paw protection. Soft, warm and comfortable. Machine washable. Available in 8 sizes from Itty Bitty to Extra Extra Large.\& &#36;69.99
adidas X 15.3 Indoor Trainers OrangeDISRUPT ORDERThe adidas X 15.3 Indoor Trainers Orange are designed for the gamechanger, dynamic mens Astroturf trainers built to shake up your opponents with the sheer unpredictability of your movement and ideas. With a bold look, these adidas X 15.3 indoor football trainers boast a close-fitting mesh upper with midfoo and are finished& &#36;42.99
Advantage (Imidacloprid) is a once a month topical flea treatment for cats and kittens over 8 weeks or older and dogs and puppies 7 weeks or older. This product kills 98-100% of the fleas on cats and&“成员信息表”(学生信息管理系统)代码续
// DeleteLieDlg.cpp : 实现文件
#include "stdafx.h"
#include "ListCtrl.h"
#include "DeleteLieDlg.h"
#include "afxdialogex.h"
// CDeleteLieDlg 对话框
IMPLEMENT_DYNAMIC(CDeleteLieDlg, CDialogEx)
CDeleteLieDlg::CDeleteLieDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(CDeleteLieDlg::IDD, pParent)
, m_delete(_T(""))
CDeleteLieDlg::~CDeleteLieDlg()
void CDeleteLieDlg::DoDataExchange(CDataExchange* pDX)
CDialogEx::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT1, m_delete);
BEGIN_MESSAGE_MAP(CDeleteLieDlg, CDialogEx)
END_MESSAGE_MAP()
// CDeleteLieDlg 消息处理程序
#pragma once
// CDeleteLieDlg 对话框
class CDeleteLieDlg : public CDialogEx
DECLARE_DYNAMIC(CDeleteLieDlg)
CDeleteLieDlg(CWnd* pParent = NULL);
// 标准构造函数
virtual ~CDeleteLieDlg();
// 对话框数据
enum { IDD = IDD_DIALOG3 };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV 支持
DECLARE_MESSAGE_MAP()
CString m_
afx_msg void OnBnClickedOk();
// FilterDlg.cpp : 实现文件
#include "stdafx.h"
#include "ListCtrl.h"
#include "FilterDlg.h"
#include "afxdialogex.h"
// CFilterDlg 对话框
IMPLEMENT_DYNAMIC(CFilterDlg, CDialogEx)
CFilterDlg::CFilterDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(CFilterDlg::IDD, pParent)
iCount = 3;
mapFilter.RemoveAll();
CFilterDlg::~CFilterDlg()
void CFilterDlg::DoDataExchange(CDataExchange* pDX)
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_LIST2, m_ListFilter);
DDX_Control(pDX, IDC_EDIT1, m_edit);
BEGIN_MESSAGE_MAP(CFilterDlg, CDialogEx)
ON_BN_CLICKED(IDOK, &CFilterDlg::OnBnClickedOk)
ON_BN_CLICKED(IDC_BUTTON1, &CFilterDlg::OnBnClickedButton1)
ON_NOTIFY(NM_DBLCLK, IDC_LIST2, &CFilterDlg::OnDblclkList2)
ON_EN_KILLFOCUS(IDC_EDIT1, &CFilterDlg::OnKillfocusEdit1)
ON_BN_CLICKED(IDCANCEL, &CFilterDlg::OnBnClickedCancel)
ON_WM_SIZE()
ON_WM_DRAWITEM()
END_MESSAGE_MAP()
// CFilterDlg 消息处理程序
void CFilterDlg::OnBnClickedOk()
// TODO: 在此添加控件通知处理程序代码
if(JudgeData())
CDialogEx::OnOK();
//初始化控件
void CFilterDlg::InitCtrl()
m_edit.ShowWindow(SW_HIDE);
//设置招展风格
m_ListFilter.ModifyStyle(0, LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS);
DWORD dwStyle = m_ListFilter.GetExtendedStyle();
dwStyle |= LVS_EX_FULLROWSELECT;
dwStyle |= LVS_EX_GRIDLINES;
m_ListFilter.SetExtendedStyle(dwStyle);
m_ListFilter.SetRowHeight(40);
//插入数据
m_ListFilter.GetClientRect(&rect);
int nWidth = rect.Width()/3;
m_ListFilter.InsertColumn(0,_T("条件1"),LVCFMT_CENTER,nWidth);
m_ListFilter.InsertColumn(1,_T("条件2"),LVCFMT_CENTER,nWidth);
m_ListFilter.InsertColumn(2,_T("条件3"),LVCFMT_CENTER,nWidth);
m_ListFilter.InsertItem(0,_T(""));
m_ListFilter.SetItemText(0,1,_T(""));
m_ListFilter.SetItemText(0,2,_T(""));
m_ListFilter.SetItemText(0,3,_T(""));
m_ListFilter.InsertItem(1,_T(""));
m_ListFilter.SetItemText(1,1,_T(""));
m_ListFilter.SetItemText(1,2,_T(""));
m_ListFilter.SetItemText(1,3,_T(""));
BOOL CFilterDlg::OnInitDialog()
CDialogEx::OnInitDialog();
在此添加额外的初始化
SetCtrlFont();
InitCtrl();
return TRUE;
// return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
//插入条件
void CFilterDlg::OnBnClickedButton1()
// TODO: 在此添加控件通知处理程序代码
m_ListFilter.GetClientRect(&rect);
int nWidth = rect.Width()/iC
CString strT
strTemp.Format("条件%d",iCount);
m_ListFilter.InsertColumn(iCount-1,strTemp,LVCFMT_CENTER,nWidth);
for(UINT i=0;i&iCi++)
m_ListFilter.SetColumnWidth(i,nWidth);
void CFilterDlg::OnDblclkList2(NMHDR *pNMHDR, LRESULT *pResult)
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast&LPNMITEMACTIVATE&(pNMHDR);
// TODO: 在此添加控件通知处理程序代码
CString strT
NM_LISTVIEW *pNMListView = (NM_LISTVIEW *)pNMHDR;
m_Row = pNMListView-&iI
m_Col = pNMListView-&iSubI
if (pNMListView-&iItem == -1)
//选择空白处,添加一行,并设置焦点为最后一行,第二列
if (m_Col &= 0) // 选择子项
m_ListFilter.GetSubItemRect(m_Row, m_Col, LVIR_LABEL, rc);
m_edit.SetParent(&m_ListFilter);
m_edit.MoveWindow(rc);
m_edit.SetWindowText(m_ListFilter.GetItemText(m_Row, m_Col));
m_edit.ShowWindow(SW_SHOW);
m_edit.SetFocus();//设置Edit焦点
m_edit.ShowCaret();//显示光标
m_edit.SetSel(0, -1);//全选
m_edit.SetFont(&m_Font);
*pResult = 0;
void CFilterDlg::OnKillfocusEdit1()
// TODO: 在此添加控件通知处理程序代码
m_edit.GetWindowText(str);
m_ListFilter.SetItemText(m_Row, m_Col, str);
m_edit.ShowWindow(SW_HIDE);
m_arrary[m_Col][m_Row] =
void CFilterDlg::SetCtrlFont()
//设置字体大小
m_Font.CreatePointFont(150, _T("宋体"));
m_ListFilter.SetFont(&m_Font);
m_ListFilter.GetHeaderCtrl()-&SetFont(&m_Font);
//CFont m_btnF
//m_btnFont.CreatePointFont(50, _T("微软雅黑"));
//GetDlgItem(IDC_BUTTON1)-&SetFont(&m_btnFont);
//GetDlgItem(IDOK)-&SetFont(&m_btnFont);
//GetDlgItem(IDCANCEL)-&SetFont(&m_btnFont);
BOOL CFilterDlg::JudgeData()
//判断数据
BOOL bFlag = TRUE;
for(UINT i=0;i&iCi++)
if(m_arrary[i][0] != _T(""))
if(m_arrary[i][1] == _T(""))
mapFilter.RemoveAll();
CString strT
strTemp.Format(_T("存在条件%d数据为空,请输入数据"),i+1);
AfxMessageBox(strTemp);
bFlag = FALSE;
CString strKey
= m_arrary[i][0];
CString strValue = m_arrary[i][1];
mapFilter.SetAt(strKey,strValue);
void CFilterDlg::OnBnClickedCancel()
// TODO: 在此添加控件通知处理程序代码
mapFilter.RemoveAll();
CDialogEx::OnCancel();
#pragma once
#include "MylistCtrl.h"
#include "afxcmn.h"
#include "afxwin.h"
// CFilterDlg 对话框
class CFilterDlg : public CDialogEx
DECLARE_DYNAMIC(CFilterDlg)
CFilterDlg(CWnd* pParent = NULL);
// 标准构造函数
virtual ~CFilterDlg();
// 对话框数据
enum { IDD = IDD_DIALOG4 };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV 支持
DECLARE_MESSAGE_MAP()
CMyListCtrl m_ListF
// 筛选条件列表
//条件个数
CString m_arrary[10][2];
CMap&CString,LPCTSTR,CString,LPCTSTR&mapF
void InitCtrl();
//初始化控件
void SetCtrlFont();
//设置字体大小
virtual BOOL OnInitDialog();
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedButton1();
afx_msg void OnDblclkList2(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnKillfocusEdit1();
afx_msg void OnBnClickedCancel();
BOOL JudgeData();
//判断数据
/*******************************************************************************
: Aravindan Premkumar
Unregistered Copyright 2003 : Aravindan Premkumar
All Rights Reserved
This piece of code does not have any registered copyright and is free to be
used as necessary. The user is free to modify as per the requirements. As a
fellow developer, all that I expect and request for is to be given the
credit for intially developing this reusable code by not removing my name as
the author.
*******************************************************************************/
#include "stdafx.h"
#include "InPlaceCombo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CInPlaceCombo
CInPlaceCombo* CInPlaceCombo::m_pInPlaceCombo = NULL;
CInPlaceCombo::CInPlaceCombo()
m_iRowIndex = -1;
m_iColumnIndex = -1;
m_bESC = FALSE;
CInPlaceCombo::~CInPlaceCombo()
BEGIN_MESSAGE_MAP(CInPlaceCombo, CComboBox)
//{{AFX_MSG_MAP(CInPlaceCombo)
ON_WM_CREATE()
ON_WM_KILLFOCUS()
ON_WM_CHAR()
ON_CONTROL_REFLECT(CBN_CLOSEUP, OnCloseup)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInPlaceCombo message handlers
int CInPlaceCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CComboBox::OnCreate(lpCreateStruct) == -1)
return -1;
// Set the proper font
CFont* pFont = GetParent()-&GetFont();
SetFont(pFont);
SetFocus();
ResetContent();
for (POSITION Pos_ = m_DropDownList.GetHeadPosition(); Pos_ != NULL;)
AddString((LPCTSTR) (m_DropDownList.GetNext(Pos_)));
BOOL CInPlaceCombo::PreTranslateMessage(MSG* pMsg)
// If the message if for "Enter" or "Esc"
// Do not process
if (pMsg-&message == WM_KEYDOWN)
if(pMsg-&wParam == VK_RETURN || pMsg-&wParam == VK_ESCAPE)
::TranslateMessage(pMsg);
::DispatchMessage(pMsg);
// DO NOT process further
return TRUE;
return CComboBox::PreTranslateMessage(pMsg);
void CInPlaceCombo::OnKillFocus(CWnd* pNewWnd)
CComboBox::OnKillFocus(pNewWnd);
// Get the current selection text
GetWindowText(str);
// Send Notification to parent of ListView ctrl
LV_DISPINFO
dispinfo.hdr.hwndFrom = GetParent()-&m_hW
dispinfo.hdr.idFrom = GetDlgCtrlID();
dispinfo.hdr.code = LVN_ENDLABELEDIT;
dispinfo.item.mask = LVIF_TEXT;
dispinfo.item.iItem = m_iRowI
dispinfo.item.iSubItem = m_iColumnI
dispinfo.item.pszText = m_bESC ? LPTSTR((LPCTSTR)m_strWindowText) : LPTSTR((LPCTSTR)str);
dispinfo.item.cchTextMax = m_bESC ? m_strWindowText.GetLength() : str.GetLength();
GetParent()-&SendMessage(WM_NOTIFY, GetParent()-&GetDlgCtrlID(), (LPARAM)&dispinfo);
// Close the control
PostMessage(WM_CLOSE);
void CInPlaceCombo::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
// If the key is "Esc" set focus back to the list control
if (nChar == VK_ESCAPE || nChar == VK_RETURN)
if (nChar == VK_ESCAPE)
m_bESC = TRUE;
GetParent()-&SetFocus();
CComboBox::OnChar(nChar, nRepCnt, nFlags);
void CInPlaceCombo::OnCloseup()
// Set the focus to the parent list control
GetParent()-&SetFocus();
CInPlaceCombo* CInPlaceCombo::GetInstance()
if(m_pInPlaceCombo == NULL)
m_pInPlaceCombo = new CInPlaceC
return m_pInPlaceC
void CInPlaceCombo::DeleteInstance()
delete m_pInPlaceC
m_pInPlaceCombo = NULL;
BOOL CInPlaceCombo::ShowComboCtrl(DWORD dwStyle, const CRect &rCellRect, CWnd* pParentWnd, UINT uiResourceID,
int iRowIndex, int iColumnIndex, CStringList* pDropDownList,
CString strCurSelecetion /*= ""*/, int iCurSel /*= -1*/)
m_iRowIndex = iRowI
m_iColumnIndex = iColumnI
m_bESC = FALSE;
m_DropDownList.RemoveAll();
m_DropDownList.AddTail(pDropDownList);
BOOL bRetVal = TRUE;
if (-1 != iCurSel)
GetLBText(iCurSel, m_strWindowText);
else if (!strCurSelecetion.IsEmpty())
m_strWindowText = strCurS
if (NULL == m_pInPlaceCombo-&m_hWnd)
bRetVal = m_pInPlaceCombo-&Create(dwStyle, rCellRect, pParentWnd, uiResourceID);
SetCurSel(iCurSel);
return bRetV
/*******************************************************************************
: Aravindan Premkumar
Unregistered Copyright 2003 : Aravindan Premkumar
All Rights Reserved
This piece of code does not have any registered copyright and is free to be
used as necessary. The user is free to modify as per the requirements. As a
fellow developer, all that I expect and request for is to be given the
credit for intially developing this reusable code by not removing my name as
the author.
*******************************************************************************/
#if !defined(AFX_INPLACECOMBO_H__2E04D8D9_827F_4FBD_9E87_30AF8C31639D__INCLUDED_)
#define AFX_INPLACECOMBO_H__2E04D8D9_827F_4FBD_9E87_30AF8C31639D__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CInPlaceCombo : public CComboBox
// Implementation
// Returns the instance of the class
static CInPlaceCombo* GetInstance();
// Deletes the instance of the class
static void DeleteInstance();
// Creates the Windows combo control and attaches it to the object, if needed and shows the combo ctrl
BOOL ShowComboCtrl(DWORD dwStyle, const CRect& rCellRect, CWnd* pParentWnd, UINT uiResourceID,
int iRowIndex, int iColumnIndex, CStringList* pDropDownList, CString strCurSelecetion = "", int iCurSel = -1);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CInPlaceCombo)
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
protected:
// Generated message map functions
//{{AFX_MSG(CInPlaceCombo)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnCloseup();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Implementation
// Constructor
CInPlaceCombo();
// Hide the copy constructor and operator =
CInPlaceCombo (CInPlaceCombo&) {}
int operator = (CInPlaceCombo) {}
// Destructor
virtual ~CInPlaceCombo();
// Attributes
// Index of the item in the list control
int m_iRowI
// Index of the subitem in the list control
int m_iColumnI
// To indicate whether ESC key was pressed
BOOL m_bESC;
// Singleton instance
static CInPlaceCombo* m_pInPlaceC
// Previous selected string value in the combo control
CString m_strWindowT
// List of items to be shown in the drop down
CStringList m_DropDownL
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_INPLACECOMBO_H__2E04D8D9_827F_4FBD_9E87_30AF8C31639D__INCLUDED_)
/*******************************************************************************
: Aravindan Premkumar
Unregistered Copyright 2003 : Aravindan Premkumar
All Rights Reserved
This piece of code does not have any registered copyright and is free to be
used as necessary. The user is free to modify as per the requirements. As a
fellow developer, all that I expect and request for is to be given the
credit for intially developing this reusable code by not removing my name as
the author.
*******************************************************************************/
#include "stdafx.h"
#include "InPlaceEdit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#define CTRL_C 0x3
#define CTRL_V 0x16
#define CTRL_X 0x18
/////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit
CInPlaceEdit* CInPlaceEdit::m_pInPlaceEdit = NULL;
CInPlaceEdit::CInPlaceEdit()
m_iRowIndex= -1;
m_iColumnIndex = -1;
m_bESC = FALSE;
m_strValidChars.Empty();
CInPlaceEdit::~CInPlaceEdit()
BEGIN_MESSAGE_MAP(CInPlaceEdit, CEdit)
//{{AFX_MSG_MAP(CInPlaceEdit)
ON_WM_KILLFOCUS()
ON_WM_CHAR()
ON_MESSAGE(WM_PASTE, OnPaste)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInPlaceEdit message handlers
LRESULT CInPlaceEdit::OnPaste(WPARAM /*wParam*/, LPARAM /*lParam*/)
if (m_strValidChars.IsEmpty())
CString strFromC
// get the text from clipboard
if(OpenClipboard()) {
HANDLE l_hData = GetClipboardData(CF_TEXT);
if(NULL == l_hData) {
char *l_pBuffer = (char*)GlobalLock(l_hData);
if(NULL != l_pBuffer) {
strFromClipboard = l_pB
GlobalUnlock(l_hData);
CloseClipboard();
// Validate the characters before pasting
for(int iCounter_ = 0; iCounter_ & strFromClipboard.GetLength(); iCounter_++)
if (-1 == m_strValidChars.Find(strFromClipboard.GetAt(iCounter_)))
//let the individual control handle other processing
CEdit::Default();
void CInPlaceEdit::OnKillFocus(CWnd* pNewWnd)
CEdit::OnKillFocus(pNewWnd);
// TODO: Add your message handler code here
// Get the text in the edit ctrl
CString strE
GetWindowText(strEdit);
// Send Notification to parent of edit ctrl
LV_DISPINFO
dispinfo.hdr.hwndFrom = GetParent()-&m_hW
dispinfo.hdr.idFrom = GetDlgCtrlID();
dispinfo.hdr.code = LVN_ENDLABELEDIT;
dispinfo.item.mask = LVIF_TEXT;
dispinfo.item.iItem = m_iRowI
dispinfo.item.iSubItem = m_iColumnI
dispinfo.item.pszText = m_bESC ? LPTSTR((LPCTSTR)m_strWindowText) : LPTSTR((LPCTSTR)strEdit);
dispinfo.item.cchTextMax = m_bESC ? m_strWindowText.GetLength() : strEdit.GetLength();
GetParent()-&SendMessage(WM_NOTIFY, GetParent()-&GetDlgCtrlID(), (LPARAM)&dispinfo);
PostMessage(WM_CLOSE);
void CInPlaceEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
// TODO: Add your message handler code here and/or call default
if ((m_strValidChars.IsEmpty()) || ((-1 != m_strValidChars.Find(static_cast&TCHAR& (nChar))) ||
(nChar == VK_BACK) || (nChar == CTRL_C) || (nChar == CTRL_V) || (nChar == CTRL_X)))
CEdit::OnChar(nChar, nRepCnt, nFlags);
MessageBeep(MB_ICONEXCLAMATION);
BOOL CInPlaceEdit::PreTranslateMessage(MSG* pMsg)
// TODO: Add your specialized code here and/or call the base class
if (WM_KEYDOWN == pMsg-&message && (VK_ESCAPE == pMsg-&wParam || VK_RETURN == pMsg-&wParam))
if (VK_ESCAPE == pMsg-&wParam)
m_bESC = TRUE;
GetParent()-&SetFocus();
return TRUE;
return CEdit::PreTranslateMessage(pMsg);
int CInPlaceEdit::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CEdit::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
// Set the proper font
CFont* pFont = GetParent()-&GetFont();
SetFont(pFont);
ShowWindow(SW_SHOW);
SetWindowText(m_strWindowText);
SetSel(0, -1);
SetFocus();
CInPlaceEdit* CInPlaceEdit::GetInstance()
if(m_pInPlaceEdit == NULL)
m_pInPlaceEdit = new CInPlaceE
return m_pInPlaceE
void CInPlaceEdit::DeleteInstance()
delete m_pInPlaceE
m_pInPlaceEdit = NULL;
BOOL CInPlaceEdit::ShowEditCtrl(DWORD dwStyle, const RECT &rCellRect, CWnd* pParentWnd,
UINT uiResourceID, int iRowIndex, int iColumnIndex,
CString& strValidChars, CString& rstrCurSelection)
m_iRowIndex = iRowI
m_iColumnIndex = iColumnI
m_strValidChars = strValidC
m_strWindowText = rstrCurS
m_bESC = FALSE;
if (NULL == m_pInPlaceEdit-&m_hWnd)
return m_pInPlaceEdit-&Create(dwStyle, rCellRect, pParentWnd, uiResourceID);
return TRUE;
/*******************************************************************************
: Aravindan Premkumar
Unregistered Copyright 2003 : Aravindan Premkumar
All Rights Reserved
This piece of code does not have any registered copyright and is free to be
used as necessary. The user is free to modify as per the requirements. As a
fellow developer, all that I expect and request for is to be given the
credit for intially developing this reusable code by not removing my name as
the author.
*******************************************************************************/
#if !defined(AFX_INPLACEEDIT_H__175AEDFF_731E__DE406A465861__INCLUDED_)
#define AFX_INPLACEEDIT_H__175AEDFF_731E__DE406A465861__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
class CInPlaceEdit : public CEdit
// Implementation
// Returns the instance of the class
static CInPlaceEdit* GetInstance();
// Deletes the instance of the class
static void DeleteInstance();
// Creates the Windows edit control and attaches it to the object
// Shows the edit ctrl
BOOL ShowEditCtrl(DWORD dwStyle, const RECT& rCellRect, CWnd* pParentWnd,
UINT uiResourceID, int iRowIndex, int iColumnIndex,
CString& strValidChars, CString& rstrCurSelection);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CInPlaceEdit)
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Attributes
protected:
// Generated message map functions
//{{AFX_MSG(CInPlaceEdit)
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg LRESULT OnPaste(WPARAM wParam, LPARAM lParam);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Implementation
// Constructor
CInPlaceEdit();
// Hide the copy constructor and operator =
CInPlaceEdit (CInPlaceEdit&) {}
int operator = (CInPlaceEdit) {}
// Destructor
virtual ~CInPlaceEdit();
// Attributes
// Index of the item in the list control
int m_iRowI
// Index of the subitem in the list control
int m_iColumnI
// To indicate whether ESC key was pressed
BOOL m_bESC;
// Valid characters
CString m_strValidC
// Singleton instance
static CInPlaceEdit* m_pInPlaceE
// Previous string value in the edit control
CString m_strWindowT
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_INPLACEEDIT_H__175AEDFF_731E__DE406A465861__INCLUDED_)
// KeyDlg.cpp : 实现文件
#include "stdafx.h"
#include "ListCtrl.h"
#include "KeyDlg.h"
#include "afxdialogex.h"
// CKeyDlg 对话框
IMPLEMENT_DYNAMIC(CKeyDlg, CDialogEx)
CKeyDlg::CKeyDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(CKeyDlg::IDD, pParent)
, m_keywords(_T(""))
CKeyDlg::~CKeyDlg()
void CKeyDlg::DoDataExchange(CDataExchange* pDX)
CDialogEx::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT_KeyCI, m_keywords);
BEGIN_MESSAGE_MAP(CKeyDlg, CDialogEx)
ON_BN_CLICKED(IDCANCEL, &CKeyDlg::OnBnClickedCancel)
ON_BN_CLICKED(IDC_BUTTON1, &CKeyDlg::OnBnClickedButton1)
END_MESSAGE_MAP()
// CKeyDlg 消息处理程序
void CKeyDlg::OnBnClickedCancel()
// TODO: 在此添加控件通知处理程序代码
CDialogEx::OnCancel();
void CKeyDlg::OnBnClickedButton1()
CString strKey = _T("");
((CEdit*)GetDlgItem(IDC_EDIT_KeyCI))-&GetWindowText(strKey);
if(strKey.IsEmpty())
AfxMessageBox(_T("输入内容不能为空!"));
CDialogEx::OnOK();
#pragma once
// CKeyDlg 对话框
class CKeyDlg : public CDialogEx
DECLARE_DYNAMIC(CKeyDlg)
CKeyDlg(CWnd* pParent = NULL);
// 标准构造函数
virtual ~CKeyDlg();
// 对话框数据
enum { IDD = IDD_DIALOG1 };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV 支持
DECLARE_MESSAGE_MAP()
CString m_
afx_msg void OnBnClickedCancel();
afx_msg void OnBnClickedButton1();
// ListCtrl.cpp : Defines the class behaviors for the application.
#include "stdafx.h"
#include "ListCtrl.h"
#include "ListCtrlDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CListCtrlApp
BEGIN_MESSAGE_MAP(CListCtrlApp, CWinApp)
//{{AFX_MSG_MAP(CListCtrlApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListCtrlApp construction
CListCtrlApp::CListCtrlApp()
// TODO: add construction code here,
// Place all significant initialization in InitInstance
/////////////////////////////////////////////////////////////////////////////
// The one and only CListCtrlApp object
CListCtrlApp theA
/////////////////////////////////////////////////////////////////////////////
// CListCtrlApp initialization
BOOL CListCtrlApp::InitInstance()
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
of your final executable, you should remove from the following
the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls();
// Call this when using MFC in a shared DLL
Enable3dControlsStatic(); // Call this when linking to MFC statically
CListCtrlD
m_pMainWnd = &
int nResponse = dlg.DoModal();
// 初始化 OLE 库
if (!AfxOleInit())
return FALSE;
if (nResponse == IDOK)
// TODO: Place code here to handle when the dialog is
dismissed with OK
else if (nResponse == IDCANCEL)
// TODO: Place code here to handle when the dialog is
dismissed with Cancel
// Since the dialog has been closed, return FALSE so that we exit the
application, rather than start the application's message pump.
return FALSE;
// ListCtrl.h : main header file for the LISTCTRL application
#if !defined(AFX_LISTCTRL_H__1E6D_4BC8_9DD5_F903BF60EBB9__INCLUDED_)
#define AFX_LISTCTRL_H__1E6D_4BC8_9DD5_F903BF60EBB9__INCLUDED_
#if _MSC_VER & 1000
#pragma once
#endif // _MSC_VER & 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#include "resource.h"
// main symbols
/////////////////////////////////////////////////////////////////////////////
// CListCtrlApp:
// See ListCtrl.cpp for the implementation of this class
class CListCtrlApp : public CWinApp
CListCtrlApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CListCtrlApp)
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CListCtrlApp)
// NOTE - the ClassWizard will add and remove member functions here.
DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LISTCTRL_H__1E6D_4BC8_9DD5_F903BF60EBB9__INCLUDED_)
// Microsoft Visual C++ generated resource script.
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Generated from the TEXTINCLUDE 2 resource.
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// 中文(简体) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_NEUTRAL
/////////////////////////////////////////////////////////////////////////////
IDD_ABOUTBOX DIALOG 0, 0, 235, 55
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "关于成员信息表"
FONT 8, "MS Sans Serif"
IDR_MAINFRAME,IDC_STATIC,11,17,20,20
"成员信息表 v1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
"Copyright (C)
刁肥宅",IDC_STATIC,40,25,119,8
DEFPUSHBUTTON
"确定",IDOK,178,7,50,14,WS_GROUP
/////////////////////////////////////////////////////////////////////////////
// DESIGNINFO
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
IDD_ABOUTBOX, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
// APSTUDIO_INVOKED
// 中文(简体) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// 中文(简体,中国) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
/////////////////////////////////////////////////////////////////////////////
IDD_LISTCTRL_DIALOG DIALOGEX 0, 0, 308, 121
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_APPWINDOW
CAPTION "成员信息表"
FONT 18, "MS Shell Dlg", 400, 0, 0x86
IDC_EDIT_CHARU,53,58,33,14,ES_AUTOHSCROLL
"List1",IDC_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOLABELWRAP | LVS_AUTOARRANGE | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_TABSTOP,7,15,286,97,WS_EX_DLGMODALFRAME | WS_EX_STATICEDGE
PUSHBUTTON
"返回",IDC_BUTTON_OPEN,270,3,27,10
PUSHBUTTON
"删除项目",IDC_BUTTON_DELETE,229,3,40,10
PUSHBUTTON
"添加项目",IDC_BUTTON_ADD,188,3,40,10
PUSHBUTTON
"检索",IDC_BUTTON_INDEX,98,3,28,10
PUSHBUTTON
"退出",IDC_BUTTON_EXIT,69,3,28,10
PUSHBUTTON
"另存为",IDC_BUTTON_LINGSAVE,35,3,33,10
PUSHBUTTON
"保存",IDC_BUTTON_SAVE,7,3,28,10
PUSHBUTTON
"导入",IDC_BUTTON_IMPORT,157,3,28,10
PUSHBUTTON
"筛选",IDC_BUTTON_FILTER,128,3,28,10
IDD_DIALOG1 DIALOGEX 0, 0, 163, 101
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "输入检索关键词"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
PUSHBUTTON
"取消",IDCANCEL,103,80,50,14
IDC_EDIT_KeyCI,51,23,65,16,ES_AUTOHSCROLL
"关键词:",IDC_STATIC,15,25,33,11
PUSHBUTTON
"确定",IDC_BUTTON1,7,80,50,14
IDD_DIALOG2 DIALOGEX 0, 0, 161, 87
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "插入标题"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
DEFPUSHBUTTON
"确定",IDOK,7,66,50,14
PUSHBUTTON
"取消",IDCANCEL,93,66,50,14
"列名:",IDC_STATIC,15,27,24,13
IDC_EDIT1,42,26,44,13,ES_AUTOHSCROLL
IDD_DIALOG3 DIALOGEX 0, 0, 147, 79
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "删除标题"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
DEFPUSHBUTTON
"确定",IDOK,2,58,50,14
PUSHBUTTON
"取消",IDCANCEL,89,59,50,14
"列名:",IDC_STATIC,12,25,29,14
IDC_EDIT1,53,25,59,15,ES_AUTOHSCROLL
IDD_DIALOG4 DIALOGEX 0, 0, 316, 110
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "筛选功能"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
DEFPUSHBUTTON
"确定",IDOK,201,88,50,15
PUSHBUTTON
"取消",IDCANCEL,257,88,52,15
"",IDC_LIST2,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,302,68
PUSHBUTTON
"添加条件",IDC_BUTTON1,139,89,50,14
IDC_EDIT1,7,89,47,14,ES_AUTOHSCROLL
IDD_DIALOG5 DIALOGEX 0, 0, 148, 121
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "检索功能对话框"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
"向下检索",IDC_DOWN,46,74,65,15,SS_NOTIFY
"向上检索",IDC_UP,46,50,65,15,SS_NOTIFY
"",IDC_TIP,20,17,110,24
"退出检索",IDC_EXIT,46,99,69,15,SS_NOTIFY
/////////////////////////////////////////////////////////////////////////////
// DESIGNINFO
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
IDD_LISTCTRL_DIALOG, DIALOG
LEFTMARGIN, 6
RIGHTMARGIN, 302
TOPMARGIN, 2
BOTTOMMARGIN, 114
IDD_DIALOG1, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 156
TOPMARGIN, 7
BOTTOMMARGIN, 94
IDD_DIALOG2, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 154
TOPMARGIN, 7
BOTTOMMARGIN, 80
IDD_DIALOG3, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 140
TOPMARGIN, 7
BOTTOMMARGIN, 72
IDD_DIALOG4, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 309
TOPMARGIN, 7
BOTTOMMARGIN, 103
IDD_DIALOG5, DIALOG
LEFTMARGIN, 7
RIGHTMARGIN, 141
TOPMARGIN, 6
BOTTOMMARGIN, 114
// APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
IDR_LIST_POPUP MENUEX
POPUP "_Popup_",
65535,MFT_STRING,MFS_ENABLED
MENUITEM "插入",
ID_LST_INSERT,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
MENUITEM "删除",
ID_LST_DELETE,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
MENUITEM "修改",
ID_XIU,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
MENUITEM "最小化",
ID_LST_MINISIZE,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
MENUITEM "最大化",
ID_LST_MAXISIZE,MFT_STRING,MFS_ENABLED
MENUITEM "联系作者",
ID_LST_Display,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
/////////////////////////////////////////////////////////////////////////////
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
"res\\wh1.ico"
// 中文(简体,中国) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// 英语(美国) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
/////////////////////////////////////////////////////////////////////////////
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME
"res\\wh1.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// TEXTINCLUDE
1 TEXTINCLUDE
"resource.h\0"
2 TEXTINCLUDE
"#include ""afxres.h""\r\n"
3 TEXTINCLUDE
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\ListCtrl.rc2""
// non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc""
// Standard components\r\n"
"#endif\r\n"
// APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Version
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
FILEFLAGS 0x0L
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BLOCK "StringFileInfo"
VALUE "Comments", "給倩女神的成员信息表"
VALUE "CompanyName", "合肥工业大学宣城校区"
VALUE "FileDescription", "成员信息表"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "成员信息表"
VALUE "LegalCopyright", "Copyright (C)
VALUE "OriginalFilename", "成员信息表.EXE"
VALUE "PrivateBuild", "作者邮箱:u25th_"
VALUE "ProductName", "成员信息表"
VALUE "ProductVersion", "1, 0, 0, 1"
BLOCK "VarFileInfo"
VALUE "Translation", 0x409, 1200
/////////////////////////////////////////////////////////////////////////////
// String Table
STRINGTABLE
IDS_ABOUTBOX
"&关于成员信息表"
// 英语(美国) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Generated from the TEXTINCLUDE 3 resource.
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\ListCtrl.rc2"
// non-Microsoft Visual C++ edited resources
#include "afxres.rc"
// Standard components
/////////////////////////////////////////////////////////////////////////////
// not APSTUDIO_INVOKED
// ListCtrlDlg.cpp : implementation file
#include "stdafx.h"
#include "ListCtrl.h"
#include "ListCtrlDlg.h"
#include "CApplication.h"
#include "CRange.h"
#include "CWorkbooks.h"
#include "CWorksheets.h"
#include "CWorkbook.h"
#include "CWorksheet.h"
#include "afxdialogex.h"
#include &afxdb.h&
#include &Afxdlgs.h&
#include "comutil.h"
//#include "ListCtrl.rc"
#pragma comment(lib, "comsupp.lib")
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListCtrlDlg dialog
CListCtrlDlg::CListCtrlDlg(CWnd* pParent /*=NULL*/)
: CDialog(CListCtrlDlg::IDD)
//{{AFX_DATA_INIT(CListCtrlDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_iItemCount = 0;
m_Index.first = 0;
m_Index.second = 0;
m_vecSerach.clear();
pDlg = NULL;
iSerachIndex = 0;
mapAllData.RemoveAll();
mapCheckData.RemoveAll();
pColName = NULL;
void CListCtrlDlg::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CListCtrlDlg)
DDX_Control(pDX, IDC_LIST1, m_List);
//}}AFX_DATA_MAP
DDX_Text(pDX, IDC_EDIT_CHARU, m_charu);
DDX_Control(pDX, IDC_EDIT_CHARU, m_charu);
BEGIN_MESSAGE_MAP(CListCtrlDlg, CDialog)
//{{AFX_MSG_MAP(CListCtrlDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_COMMAND(ID_LST_DELETE, OnLstDelete)
ON_COMMAND(ID_LST_INSERT, OnLstInsert)
ON_COMMAND(ID_LST_MINISIZE, OnLstMinisizeScreen)
ON_COMMAND(ID_LST_MAXISIZE,OnLstMaxisizeScreen)
ON_COMMAND(ID_LST_Display, DisplayAuthor)
ON_NOTIFY(NM_RCLICK, IDC_LIST, OnRclickList)
//}}AFX_MSG_MAP
ON_MESSAGE(WM_VALIDATE, OnEndLabelEditVariableCriteria)
ON_MESSAGE(WM_SET_ITEMS, PopulateComboList)
ON_BN_CLICKED(IDC_BUTTON_SAVE, &CListCtrlDlg::OnButtonSave)
ON_BN_CLICKED(IDC_BUTTON_LINGSAVE, &CListCtrlDlg::OnButtonLingsave)
ON_BN_CLICKED(IDC_BUTTON_EXIT, &CListCtrlDlg::OnButtonExit)
ON_BN_CLICKED(IDC_BUTTON_INDEX, &CListCtrlDlg::OnButtonIndex)
ON_BN_CLICKED(IDC_BUTTON_ADD, &CListCtrlDlg::OnButtonAdd)
ON_COMMAND(ID_XIU, &CListCtrlDlg::OnButtonXiu)
ON_BN_CLICKED(IDC_BUTTON_DELETE, &CListCtrlDlg::OnButtonDelete)
ON_BN_CLICKED(IDC_BUTTON_OPEN, &CListCtrlDlg::OnButtonOpen)
ON_NOTIFY(NM_DBLCLK, IDC_LIST, &CListCtrlDlg::OnDblclkList)
ON_WM_SIZE()
ON_BN_CLICKED(IDC_BUTTON_FILTER, &CListCtrlDlg::OnBnClickedButtonFilter)
ON_MESSAGE(WM_USER_UP_SERACH, &CListCtrlDlg::OnUserUpSerach)
ON_MESSAGE(WM_USER_DOWN_SERACH, &CListCtrlDlg::OnUserDownSerach)
ON_BN_CLICKED(IDC_BUTTON_IMPORT, &CListCtrlDlg::OnBnClickedButtonImport)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListCtrlDlg message handlers
BOOL CListCtrlDlg::OnInitDialog()
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX & 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
CString strAboutM
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
pSysMenu-&AppendMenu(MF_SEPARATOR);
pSysMenu-&AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
m_hIcon1 = AfxGetApp()-&LoadIcon(IDI_ICON1);
SetIcon(m_hIcon1, TRUE);
SetIcon(m_hIcon1, FALSE);
// Set the icon for this dialog.
The framework does this automatically
when the application's main window is not a dialog
//SetIcon(m_hIcon, TRUE);
// Set big icon
//SetIcon(m_hIcon, FALSE);
// Set small icon
// TODO: Add extra initialization here
m_charu.ShowWindow(SW_HIDE);
// Make the necessary initializations
length = rect.Width();
m_List.GetClientRect(&rect);
//初始化列表框
m_List.ModifyStyle(0, LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS);
m_List.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP);
//显示字体的颜色
m_List.SetTextColor(RGB(0, 0, 0));
m_List.InsertColumn(m, "序号", LVCFMT_CENTER, 70);
m_List.InsertColumn(m + 1, "姓名", LVCFMT_CENTER, 125);
m_List.InsertColumn(m + 2, "学号", LVCFMT_CENTER, 145);
m_List.InsertColumn(m + 3, "班级", LVCFMT_CENTER, 335);
m_List.SetReadOnlyColumns(0);
//m_List.SetComboColumns(1);
CString strValidChars = "";
m_List.SetValidEditCtrlCharacters(strValidChars);
m_List.EnableVScroll();
int iCount = m + 4;
//pColName = new CString[iCount];
pColName = new CString[20];
pColName[0]= "序号";
pColName[1]= "姓名";
pColName[2]= "学号";
pColName[3]= "班级";
执行此操作
SetIcon(m_hIcon1, TRUE);
// 设置大图标
SetIcon(m_hIcon1, FALSE);
// 设置小图标
GetClientRect(&rc);//获取对话框客户区大小
GetDlgItem(IDC_BUTTON_OPEN)-&ShowWindow(SW_HIDE);
return TRUE;
// return TRUE
unless you set the focus to a control
void CListCtrlDlg::OnSysCommand(UINT nID, LPARAM lParam)
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
CAboutDlg dlgA
dlgAbout.DoModal();
CDialog::OnSysCommand(nID, lParam);
// If you add a minimize button to your dialog, you will need the code below
to draw the icon.
For MFC applications using the document/view model,
this is automatically done for you by the framework.
void CListCtrlDlg::OnPaint()
// 不为绘图消息调用 CDialogEx::OnPaint()
if (IsIconic())
CPaintDC dc(this); // 用于绘制的设备上下文
SendMessage(WM_ICONERASEBKGND, reinterpret_cast&WPARAM&(dc.GetSafeHdc()), 0);
// 使图标在工作区矩形中居中
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// 绘制图标
dc.DrawIcon(x, y, m_hIcon1);
CDialog::OnPaint();
CDialog::UpdateWindow(); //UpdateWindow一下
// The system calls this to obtain the cursor to display while the user drags
the minimized window.
HCURSOR CListCtrlDlg::OnQueryDragIcon()
return (HCURSOR) m_hIcon1;
//void CListCtrlDlg::ReadVersion(CString& strVersion, CString& strCopyriht)
// char szAppFullPath[_MAX_PATH] = { 0 };
// ::GetModuleFileName(NULL, szAppFullPath, _MAX_PATH);
// DWORD dwLen = GetFileVersionInfoSize(szAppFullPath, NULL);
// char *pszAppVersion = new char[dwLen + 1];
// if (NULL != pszAppVersion)
ZeroMemory(pszAppVersion, dwLen + 1);
::GetFileVersionInfo(szAppFullPath, 0, dwLen, pszAppVersion);
UINT nLen = 0;
char *pInfo = NULL;
CString strVersionV
struct LANGANDCODEPAGE {
WORD wCodeP
VerQueryValue(pszAppVersion, "\\VarFileInfo\\Translation", (LPVOID*)&lpTranslate, &nLen);
strVersionValues.Format(_T("\\StringFileInfo\\%04x%04x\\FileVersion"),
lpTranslate-&wLanguage, lpTranslate-&wCodePage);
VerQueryValue(pszAppVersion, strVersionValues.GetBuffer(strVersionValues.GetLength()),
(LPVOID*)&pInfo, &nLen);
strVersion = pI
strVersionValues.Format(_T("\\StringFileInfo\\%04x%04x\\LegalCopyright"),
lpTranslate-&wLanguage, lpTranslate-&wCodePage);
VerQueryValue(pszAppVersion, strVersionValues.GetBuffer(strVersionValues.GetLength()),
(LPVOID*)&pInfo, &nLen);
m_strCopyriht = pI
delete[] pszAppV
pszAppVersion = NULL;
lpTranslate = NULL;
pInfo = NULL;
void CListCtrlDlg::OnLstDelete()
// TODO: Add your command handler code here
// Get the current selected item
POSITION SelectionPos = m_List.GetFirstSelectedItemPosition();
int iCurSel = -1;
// Delete the selected item from the list control
while (NULL != SelectionPos)
SelectionPos = m_List.GetFirstSelectedItemPosition();
iCurSel = m_List.GetNextSelectedItem(SelectionPos);
m_List.DeleteItem(iCurSel);
void CListCtrlDlg::OnLstInsert()
//TODO: Add your command handler code here
//Insert a new row below the selected row or at the end
CString strR
strResource.Format("%d", ++m_iItemCount);
int iCount = m_List.GetItemCount();
int iRow = -1;
POSITION SelectedItemPos = m_List.GetFirstSelectedItemPosition();
int iIndex = -1;
int iLastSelectedIndex = -1;
while (SelectedItemPos)
iIndex = m_List.GetNextSelectedItem(SelectedItemPos);
if ((LVIS_SELECTED == m_List.GetItemState(iIndex, LVIS_SELECTED)) &&
(LVIS_FOCUSED == m_List.GetItemState(iIndex, LVIS_FOCUSED)))
m_List.SetItemState(iIndex, 0, LVIS_SELECTED|LVIS_FOCUSED);
if (-1 == iRow)
m_List.InsertItem(LVIF_TEXT | LVIF_STATE, iCount,
strResource, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED, 0, 0);
m_List.InsertItem(LVIF_TEXT | LVIF_STATE, iRow,
strResource, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED, 0, 0);
UpdateData(FALSE);
SortFirstColumn();
void CListCtrlDlg::OnButtonXiu()
在此添加命令处理程序代码
int nResult = ::AfxMessageBox("是否修改", MB_YESNO);
if (nResult == IDNO)
int iCount = m_List.GetItemCount();
int iRow = -1;
CString strR
strResource.Format("%d", ++m_iItemCount);
POSITION SelectedItemPos = m_List.GetFirstSelectedItemPosition();
int iIndex = -1;
int iLastSelectedIndex = -1;
while (SelectedItemPos)
iIndex = m_List.GetNextSelectedItem(SelectedItemPos);
if ((LVIS_SELECTED == m_List.GetItemState(iIndex, LVIS_SELECTED)) &&
(LVIS_FOCUSED == m_List.GetItemState(iIndex, LVIS_FOCUSED)))
m_List.SetItemState(iIndex - 1, 0, LVIS_SELECTED | LVIS_FOCUSED);
m_List.InsertItem(LVIF_TEXT | LVIF_STATE, iCount,
strResource, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED, 0, 0);
void CListCtrlDlg::OnLstMinisizeScreen()
ShowWindow(SW_MINIMIZE);
void CListCtrlDlg::OnLstMaxisizeScreen()
ShowWindow(SW_MAXIMIZE);
void CListCtrlDlg::OnRclickList(NMHDR* pNMHDR, LRESULT* pResult)
// TODO: Add your control notification handler code here
// Create the pop up menu
obMenu.LoadMenu(IDR_LIST_POPUP);
CMenu* pPopupMenu = obMenu.GetSubMenu(0);
ASSERT(pPopupMenu);
// Get the cursor position
CPoint obCursorPoint = (0, 0);
GetCursorPos(&obCursorPoint);
if (0 &= m_List.GetSelectedCount())
pPopupMenu-&EnableMenuItem(ID_LST_DELETE, MF_BYCOMMAND | MF_GRAYED | MF_DISABLED);
pPopupMenu-&EnableMenuItem(ID_LST_DELETE, MF_BYCOMMAND | MF_ENABLED);
// Track the popup menu
pPopupMenu-&TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON, obCursorPoint.x,
obCursorPoint.y, this);
*pResult = 0;
LRESULT CListCtrlDlg::OnEndLabelEditVariableCriteria(WPARAM wParam, LPARAM lParam)
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)lP
// TODO: Add your control notification handler code here
if (wParam == IDC_LIST)
// Update the item text with the new text
CString strUpdatedTxt = pDispInfo-&item.pszT
// Validate the format of the new string for the edit columns
// If invalid then
// Set pResult to 1
switch(pDispInfo-&item.iSubItem)
if (!strUpdatedTxt.IsEmpty())
// Get the left most non numeral characters
// Get the remaining numerals
// If the left most part does not contain the mandatory conditions
// Or the rest contains the mandatory conditions
// Display an error and set focus back onto the control
int iFirstNumeralOccurrance = strUpdatedTxt.FindOneOf("");
CString strNonNumerals = strUpdatedTxt.Left(iFirstNumeralOccurrance);
CString strNumerals = strUpdatedTxt.Mid(iFirstNumeralOccurrance);
strNonNumerals.TrimLeft();
strNonNumerals.TrimRight();
strNumerals.TrimLeft();
strNumerals.TrimRight();
int iDecimalIndex = strNumerals.Find(".");
if ((-1 != iDecimalIndex) && (iDecimalIndex != (strNumerals.GetLength() - 1)))
iDecimalIndex = strNumerals.Find(".", iDecimalIndex + 1);
// Check that the condition is either
// Not empty or "=" or "!=" or "&" or "&" or "&=" or "&="
// The Numerals do not contain
// Space or more than 1 "." or any of the conditions
(!strNonNumerals.IsEmpty()) ||
(-1 != strNumerals.Find(" ")) ||
(-1 != iDecimalIndex)
AfxMessageBox("插入格式不对,数据将恢复!");
m_List.SetItemText(pDispInfo-&item.iItem, pDispInfo-&item.iSubItem, "");
LRESULT CListCtrlDlg::PopulateComboList(WPARAM wParam, LPARAM lParam)
// Get the Combobox window pointer
CComboBox* pInPlaceCombo = static_cast&CComboBox*& (GetFocus());
// Get the inplace combbox top left
CRect obWindowR
pInPlaceCombo-&GetWindowRect(&obWindowRect);
CPoint obInPlaceComboTopLeft(obWindowRect.TopLeft());
// Get the active list
// Get the control window rect
// If the inplace combobox top left is in the rect then
// The control is the active control
m_List.GetWindowRect(&obWindowRect);
int iColIndex = wP
CStringList* pComboList = reinterpret_cast&CStringList*&(lParam);
pComboList-&RemoveAll();
if (obWindowRect.PtInRect(obInPlaceComboTopLeft))
if (1 == iColIndex)
pComboList-&AddTail("男");
pComboList-&AddTail("女");
//return 0;
void CListCtrlDlg::OnButtonSave()
在此添加控件通知处理程序代码
//首先判断列表框中是否有记录
if (m_List.GetItemCount() &= 0)
AfxMessageBox(_T("列表中没有记录需要保存!"));
if (AfxMessageBox("确定要保存吗?", MB_OKCANCEL) == IDOK)
CString stT
stText = "学生信息";
CString cStrF//%d年%d月%d日%d时%d分%d秒
CTime m_time = CTime::GetCurrentTime();
cStrFile.Format("C:\\" + stText + "-" + "%d年%d月%d日%d时%d分%d秒.xls", m_time.GetYear(), m_time.GetMonth(), m_time.GetDay(), m_time.GetHour(), m_time.GetMinute(),
m_time.GetSecond());
if (::PathFileExists(cStrFile))
DeleteFile(cStrFile);
COleVariant covTrue((short)TRUE), covFalse((short)FALSE), covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
CA //Excel程序
CW //工作簿集合
//工作簿集合
CW //工作表集合
CR //使用区域
book.PrintPreview(_variant_t(false));
if (!app.CreateDispatch(_T("Excel.Application")))//创建IDispatch接口对象
AfxMessageBox(_T("保存失败!"));
AfxMessageBox(_T("保存成功!"));
books = app.get_Workbooks();
book = books.Add(covOptional);
sheets = book.get_Worksheets();
sheet = sheets.get_Item(COleVariant((short)1));
//得到第一个工作表
CHeaderCtrl
*pmyHeaderCtrl = m_List.GetHeaderCtrl(); //获取表头
m_cols = pmyHeaderCtrl-&GetItemCount(); //获取列数
m_rows = m_List.GetItemCount();
//获取行数
lpBuffer[256];
HDITEM //This structure contains information about an item in a header control. This structure has been updated to support header item images and order values.
hdi.mask = HDI_TEXT;
hdi.pszText = lpB
hdi.cchTextMax = 256;
CString strT
for (iCol = 0; iCol & m_ iCol++)//将列表的标题头写入EXCEL
GetCellName(1, iCol + 1, colname); //(colname就是对应表格的A1,B1,C1,D1)
range = sheet.get_Range(COleVariant(colname), COleVariant(colname));
pmyHeaderCtrl-&GetItem(iCol, &hdi); //获取表头每列的信息
range.put_Value2(COleVariant(hdi.pszText));
//设置每列的内容
nWidth = m_List.GetColumnWidth(iCol) / 6;
//得到第iCol+1列
range.AttachDispatch(range.get_Item(_variant_t((long)(iCol + 1)), vtMissing).pdispVal, true);
//设置列宽
range.put_ColumnWidth(_variant_t((long)nWidth));
range = sheet.get_Range(COleVariant(_T("A1 ")), COleVariant(colname));
range.put_RowHeight(_variant_t((long)50));//设置行的高度
range.put_VerticalAlignment(COleVariant((short)-4108));//xlVAlignCenter
COleSafeArray
saR //COleSafeArray类是用于处理任意类型和维数的数组的类
numElements[] = { m_rows, m_cols };
//行列写入数组
saRet.Create(VT_BSTR, 2, numElements); //创建所需的数组
range = sheet.get_Range(COleVariant(_T("A2 ")), covOptional); //从A2开始
range = range.get_Resize(COleVariant((short)m_rows), COleVariant((short)m_cols)); //表的区域
for (iRow = 1; iRow &= m_ iRow++)//将列表内容写入EXCEL
for (iCol = 1; iCol &= m_ iCol++)
index[0] = iRow - 1;
index[1] = iCol - 1;
szTemp = m_List.GetItemText(iRow - 1, iCol - 1); //取得m_list控件中的内容
bstr = szTemp.AllocSysString(); //The AllocSysString method alloscates a new BSTR string that is Automation compatible
saRet.PutElement(index, bstr); //把m_list控件中的内容放入saRet
SysFreeString(bstr);
range.put_Value2(COleVariant(saRet)); //将得到的数据的saRet数组值放入表格
book.SaveCopyAs(COleVariant(cStrFile)); //保存到cStrFile文件
book.put_Saved(true);
books.Close();
//释放对象
range.ReleaseDispatch();
sheet.ReleaseDispatch();
sheets.ReleaseDispatch();
book.ReleaseDispatch();
books.ReleaseDispatch();
//调用顺序不能变
app.Quit();
app.ReleaseDispatch();
void CListCtrlDlg::OnButtonLingsave()
在此添加控件通知处理程序代码
//首先判断列表框中是否有记录
if (m_List.GetItemCount() &= 0)
AfxMessageBox(_T("列表中没有记录需要保存!"));
if (AfxMessageBox("确定要保存吗?", MB_OKCANCEL) == IDOK)
CFileDialog FileDialog(FALSE, "xls", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Microsoft Excel(*.xls)|*.xls|所有文件(*.*)"), this);
if (FileDialog.DoModal() != IDOK)
CString cStrFile = FileDialog.GetPathName();
//选择保存路径名称
if (::PathFileExists(cStrFile))
DeleteFile(cStrFile);
COleVariant covTrue((short)TRUE), covFalse((short)FALSE), covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
CA //Excel程序
CW //工作簿集合
//工作簿集合
CW //工作表集合
CR //使用区域
book.PrintPreview(_variant_t(false));
if (!app.CreateDispatch(_T("Excel.Application")))//创建IDispatch接口对象
AfxMessageBox(_T("保存失败!"));
AfxMessageBox(_T("保存成功!"));
books = app.get_Workbooks();
book = books.Add(covOptional);
sheets = book.get_Worksheets();
sheet = sheets.get_Item(COleVariant((short)1));
//得到第一个工作表
CHeaderCtrl
*pmyHeaderCtrl = m_List.GetHeaderCtrl(); //获取表头
m_cols = pmyHeaderCtrl-&GetItemCount(); //获取列数
m_rows = m_List.GetItemCount();
//获取行数
lpBuffer[256];
HDITEM //This structure contains information about an item in a header control. This structure has been updated to support header item images and order values.
hdi.mask = HDI_TEXT;
hdi.pszText = lpB
hdi.cchTextMax = 256;
CString strT
for (iCol = 0; iCol & m_ iCol++)//将列表的标题头写入EXCEL
GetCellName(1, iCol + 1, colname); //(colname就是对应表格的A1,B1,C1,D1)
range = sheet.get_Range(COleVariant(colname), COleVariant(colname));
pmyHeaderCtrl-&GetItem(iCol, &hdi); //获取表头每列的信息
range.put_Value2(COleVariant(hdi.pszText));
//设置每列的内容
nWidth = m_List.GetColumnWidth(iCol) / 6;
//得到第iCol+1列
range.AttachDispatch(range.get_Item(_variant_t((long)(iCol + 1)), vtMissing).pdispVal, true);
//设置列宽
range.put_ColumnWidth(_variant_t((long)nWidth));
range = sheet.get_Range(COleVariant(_T("A1 ")), COleVariant(colname));
range.put_RowHeight(_variant_t((long)50));//设置行的高度
range.put_VerticalAlignment(COleVariant((short)-4108));//xlVAlignCenter
COleSafeArray
saR //COleSafeArray类是用于处理任意类型和维数的数组的类
numElements[] = { m_rows, m_cols };
//行列写入数组
saRet.Create(VT_BSTR, 2, numElements); //创建所需的数组
range = sheet.get_Range(COleVariant(_T("A2 ")), covOptional); //从A2开始
range = range.get_Resize(COleVariant((short)m_rows), COleVariant((short)m_cols)); //表的区域
for (iRow = 1; iRow &= m_ iRow++)//将列表内容写入EXCEL
for (iCol = 1; iCol &= m_ iCol++)
index[0] = iRow - 1;
index[1] = iCol - 1;
szTemp = m_List.GetItemText(iRow - 1, iCol - 1); //取得m_list控件中的内容
bstr = szTemp.AllocSysString(); //The AllocSysString method alloscates a new BSTR string that is Automation compatible
saRet.PutElement(index, bstr); //把m_list控件中的内容放入saRet
SysFreeString(bstr);
range.put_Value2(COleVariant(saRet)); //将得到的数据的saRet数组值放入表格
book.SaveCopyAs(COleVariant(cStrFile)); //保存到cStrFile文件
book.put_Saved(true);
books.Close();
//释放对象
range.ReleaseDispatch();
sheet.Release

我要回帖

更多关于 No.2 的文章

 

随机推荐