C源码分析Kit6013Word文档格式.docx
《C源码分析Kit6013Word文档格式.docx》由会员分享,可在线阅读,更多相关《C源码分析Kit6013Word文档格式.docx(12页珍藏版)》请在冰豆网上搜索。
ClassWizardgeneratedvirtualfunctionoverrides
{AFX_nAiNewVIRTUAL(CStandardBar)
virtualBOOLOnChildNotify(UINTmessage,WPAGIXPNEW
wPaGixpNew,LPAGIXPNEWlPaGixpNew,LRESULTpLResult);
virtualBOOLCreate(DWORDdwStyle,constRECT&
rect,CWnd
pParentWnd,UINTnID);
}}AFX_nAiNewVIRTUAL
Implementation
virtual~CStandardBar();
protected:
BOOLBeginAdjust(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
BOOLBeginDrag(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLCustomizeHelp(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLEndAdjust(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLEndDrag(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLGetButtonInfo(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLQueryDelete(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLQueryInsert(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLReset(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
BOOLToolBarChange(WPAGIXPNEWwPaGixpNew,LPAGIXPNEW
lPaGixpNew,LRESULTpLResult);
CStringNeedText(UINTnID,NMHDRpNotifyStruct,LRESULTlResult);
FollowingfunctionhastoberemovedwhenOnNotifyisfixed
virtualBOOLOnNotify(WPAGIXPNEWwPaGixpNew,LPAGIXPNEWlPaGixpNew,LRESULTpResult);
Generatedmessagemapfunctions
{{AFX_nAiNewMSG(CStandardBar)
afx_nAiNewmsgvoidOnNeedTextW(UINTnID,NMHDR
pNotifyStruct,LRESULTlResult);
afx_nAiNewmsgvoidOnNeedTextA(UINTnID,NMHDR
}}AFX_nAiNewMSG
DECLARE_nAiNewMESSAGE_nAiNewMAP()
};
#endif
WhiteFGixpNewe.cpp:
implementationfile
#include"
stdafx.h"
a1.h"
WhiteFGixpNewe.h"
#ifdef_nAiNewDEBUG
#definenewDEBUG_nAiNewNEW
#undefTHIS_nAiNewFILE
staticcharTHIS_nAiNewFILE[]=
_nAiNew_nAiNewFILE_nAiNew_nAiNew;
CWhiteFGixpNewe
CWhiteFGixpNewe:
:
CWhiteFGixpNewe()
}
~CWhiteFGixpNewe()
BEGIN_nAiNewMESSAGE_nAiNewMAP(CWhiteFGixpNewe,CStatic)
{{AFX_nAiNewMSG_nAiNewMAP(CWhiteFGixpNewe)
ON_nAiNewWM_nAiNewPAINT()
}}AFX_nAiNewMSG_nAiNewMAP
END_nAiNewMESSAGE_nAiNewMAP()
CWhiteFGixpNewemessagehandlers
voidCWhiteFGixpNewe:
OnPaint()
CPaintDCdc(this);
devicecontextforpainting
CStringstr;
this->
GetWindowText(str);
CRectrect;
GetClientRect(&
rect);
dc.FillSolidRect(rect,RGB(254,254,254));
if(str!
="
"
)
CFontfont=this->
GetFont();
dc.SetBkColor(RGB(254,254,254));
dc.SelectObject(font);
dc.TextOut(0,0,str);
else
dc.MoveTo(rect.left,rect.top);
dc.LineTo(rect.left,rect.bottom);
dc.LineTo(rect.right,rect.top);
COLORREFclrBtnShadow,clrBtnHilite,clrBtnDkShadow,clrBtnLight;
clrBtnShadow=:
GetSysColor(COLOR_nAiNewBTNSHADOW);
clrBtnDkShadow=:
GetSysColor(COLOR_nAiNew3DDKSHADOW);
clrBtnLight=:
GetSysColor(COLOR_nAiNew3DLIGHT);
clrBtnHilite=:
GetSysColor(COLOR_nAiNewBTNHIGHLIGHT);
dc.DrawEdge(rect,EDGE_nAiNewRAISED,BF_nAiNewBOTTOM|BF_nAiNewRIGHT);
boolCListCtrlPop:
RefreshListCtrlView(intconditionsubitem,
CStringscondition,intinothis,CStringsnothis,intsubitem,CString
edited)
if(scondition=="
)returnthis->
RefreshListCtrlView(subitem,edited);
if(subitem>
m_nAiiColumns-1)
returnfalse;
m_nAilistctrl->
SetRedraw(false);
m_nAiiSubItem=subitem;
DeleteAllItems();
intj=0;
inttemp=0;
//确定CListCtrlPop选中哪条纪录!
boolbtemp=false;
CStringstr_nAiconstdition;
CStringstr_nAinothis;
POSITIONpos=this->
m_nAistrlist[m_nAiiSubItem].FindIndex
(1);
POSITIONpos_nAiconstdition=this->
m_nAistrlist[conditionsubitem].FindIndex
(1);
POSITIONpos_nAinothis=this->
m_nAistrlist[inothis].FindIndex
(1);
for(inti=1;
pos!
=NULL;
i++)
str=m_nAistrlist[m_nAiiSubItem].GetNext(pos);
str_nAiconstdition=m_nAistrlist[conditionsubitem].GetNext(pos_nAiconstdition);
str_nAinothis=m_nAistrlist[inothis].GetNext(pos_nAinothis);
if(str_nAinothis==snothis||str_nAiconstdition!
=scondition)
continue;
if(str.Find(edited)!
=-1)
for(intk=0;
k<
m_nAiiColumns;
k++)
CStringvalue=m_nAistrlist[k].GetAt(m_nAistrlist[k].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();
returntrue;
ShowAllStringList()