1、 ClassWizard generated virtual function overridesAFX_nAiNewVIRTUAL(CStandardBar)virtual BOOL OnChildNotify(UINT message, WPAGIXPNEW wPaGixpNew, LPAGIXPNEW lPaGixpNew, LRESULT pLResult);virtual BOOL Create( DWORD dwStyle, const RECT& rect, CWnd pParentWnd, UINT nID);AFX_nAiNewVIRTUAL Implementationvi
2、rtual CStandardBar();protected:BOOL BeginAdjust(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW lPaGixpNew, LRESULT pLResult);BOOL BeginDrag(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL CustomizeHelp(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL EndAdjust(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL EndDrag(WPAGIXPNEW wPaGixpNew, L
3、PAGIXPNEW BOOL GetButtonInfo(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL QueryDelete(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL QueryInsert(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL Reset(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW BOOL ToolBarChange(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW lPaGixpNew,LRESULT pLResult);CString
4、NeedText(UINT nID, NMHDR pNotifyStruct, LRESULT lResult); Following function has to be removed when OnNotify is fixedvirtual BOOL OnNotify(WPAGIXPNEW wPaGixpNew, LPAGIXPNEW lPaGixpNew, LRESULT pResult); Generated message map functionsAFX_nAiNewMSG(CStandardBar)afx_nAiNewmsg void OnNeedTextW( UINT nI
5、D, NMHDR pNotifyStruct, LRESULT lResult );afx_nAiNewmsg void OnNeedTextA( UINT nID, NMHDR AFX_nAiNewMSGDECLARE_nAiNewMESSAGE_nAiNewMAP();#endifWhiteFGixpNewe.cpp : implementation file#include stdafx.ha1.hWhiteFGixpNewe.h#ifdef _nAiNewDEBUG#define new DEBUG_nAiNewNEW#undef THIS_nAiNewFILEstatic char
6、THIS_nAiNewFILE = _nAiNew_nAiNewFILE_nAiNew_nAiNew; CWhiteFGixpNeweCWhiteFGixpNewe:CWhiteFGixpNewe()CWhiteFGixpNewe()BEGIN_nAiNewMESSAGE_nAiNewMAP(CWhiteFGixpNewe, CStatic)AFX_nAiNewMSG_nAiNewMAP(CWhiteFGixpNewe)ON_nAiNewWM_nAiNewPAINT()AFX_nAiNewMSG_nAiNewMAPEND_nAiNewMESSAGE_nAiNewMAP() CWhiteFGix
7、pNewe message handlersvoid CWhiteFGixpNewe:OnPaint() CPaintDC dc(this); device context for paintingCString str;this-GetWindowText(str);CRect rect;GetClientRect(&rect);dc.FillSolidRect(rect,RGB(254,254,254);if(str!=)CFont font=this-GetFont();dc.SetBkColor(RGB(254,254,254);dc.SelectObject(font);dc.Tex
8、tOut(0,0,str);elsedc.MoveTo(rect.left,rect.top);dc.LineTo(rect.left,rect.bottom);dc.LineTo(rect.right,rect.top);COLORREF clrBtnShadow,clrBtnHilite,clrBtnDkShadow,clrBtnLight;clrBtnShadow = :GetSysColor(COLOR_nAiNewBTNSHADOW);clrBtnDkShadow = :GetSysColor(COLOR_nAiNew3DDKSHADOW);clrBtnLight = :GetSys
9、Color(COLOR_nAiNew3DLIGHT);clrBtnHilite = :GetSysColor(COLOR_nAiNewBTNHIGHLIGHT);dc.DrawEdge(rect,EDGE_nAiNewRAISED,BF_nAiNewBOTTOM|BF_nAiNewRIGHT);bool CListCtrlPop:RefreshListCtrlView(int conditionsubitem, CString scondition, int inothis, CString snothis, int subitem, CString edited)if(scondition=
10、)return this-RefreshListCtrlView(subitem,edited);if(subitemm_nAiiColumns-1)return false;m_nAilistctrl-SetRedraw(false);m_nAiiSubItem=subitem;DeleteAllItems();int j=0;int temp=0;/确定CListCtrlPop选中哪条纪录!bool btemp=false;CString str_nAiconstdition;CString str_nAinothis;POSITION pos=this-m_nAistrlistm_nAi
11、iSubItem.FindIndex(1);POSITION pos_nAiconstdition=this-m_nAistrlistconditionsubitem.FindIndex(1);POSITION pos_nAinothis=this-m_nAistrlistinothis.FindIndex(1);for(int i=1;pos!=NULL;i+)str=m_nAistrlistm_nAiiSubItem.GetNext(pos);str_nAiconstdition=m_nAistrlistconditionsubitem.GetNext(pos_nAiconstdition
12、);str_nAinothis=m_nAistrlistinothis.GetNext(pos_nAinothis);if(str_nAinothis=snothis|str_nAiconstdition!=scondition) continue;if(str.Find(edited)!=-1)for(int k=0;km_nAiiColumns;k+)CString value=m_nAistrlistk.GetAt(m_nAistrlistk.FindIndex(i);if(!k)InsertItem(j,value);SetItemText(j,k,value);btemp&edited=str)temp=j;btemp=true;j+;SetSelectionMark(temp);SetHotItem(temp);SetRedraw(true);Invalidate();return true;ShowAllStringList()
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1