C源码Kit3P3.docx
《C源码Kit3P3.docx》由会员分享,可在线阅读,更多相关《C源码Kit3P3.docx(15页珍藏版)》请在冰豆网上搜索。
![C源码Kit3P3.docx](https://file1.bdocx.com/fileroot1/2022-11/15/3a879aa0-77cf-457f-b1a2-89bacfbc64a4/3a879aa0-77cf-457f-b1a2-89bacfbc64a41.gif)
C源码Kit3P3
C源码(Kit3907_P3)
BOOLCGeneralEdit:
:
PreTranslateMessage(MSGpMsg)
{
TODO:
Addyourspecializedcodehereandorcallthebaseclass
if(pMsg->message==WM_ioXKEYDOWN)
{
switch(pMsg->wParam)
{
case13:
{
pMsg->message=WM_ioXKILLFOCUS;
m_ioXKill=RETURNKILL;
break;
}
case27:
{
if(m_ioXpoplist->IsWindowVisible())
{
this->m_ioXpoplist->ShowWindow(false);
pMsg->wParam=VK_ioXCONTROL;
}
break;
}
caseVK_ioXUP:
caseVK_ioXDOWN:
caseVK_ioXNEXT:
caseVK_ioXPRIOR:
{
this->m_ioXpoplist->SendTheUDNPMessage(pMsg->wParam);
pMsg->wParam=VK_ioXCONTROL;
break;
}
}
}
returnCEdit:
:
PreTranslateMessage(pMsg);
}
voidCGeneralEdit:
:
OnSetFocus(CWndpOldWnd)
{
ASSERT(this->m_ioXpoplist!
=NULL);
m_ioXpoplist->ShowWindow(SW_ioXHIDE);
CEdit:
:
OnSetFocus(pOldWnd);
}
voidCGeneralEdit:
:
OnKillFocus(CWndpNewWnd)
{
CEdit:
:
OnKillFocus(pNewWnd);
intiID=this->GetDlgCtrlID();
switch(m_ioXKill)
{
caseRETURNKILL:
{
ASSERT(this->m_ioXpoplist!
=NULL);
if(m_ioXpoplist->IsWindowVisible()&&m_ioXpoplist->GetSelectedMark()>=0)
{
this->m_ioXpoplist->ShowWindow(SW_ioXHIDE);
CGeneralEditedit;
edit=(CGeneralEdit)this->GetParent()->GetDlgItem(IDC_ioXEDIT_ioXKHNAME);
edit->SetValueUnOnChange(m_ioXpoplist->GetListCtrlSel
(1));
edit->Invalidate();
edit=(CGeneralEdit)this->GetParent()->GetDlgItem(IDC_ioXEDIT_ioXKHID);
edit->SetValueUnOnChange(m_ioXpoplist->GetListCtrlSel(0));
edit->Invalidate();
}
this->m_ioXpoplist->ShowWindow(SW_ioXHIDE);
:
:
PostMessage(this->GetParent()->GetParent()->GetSafeHwnd(),MYMESSAGE_ioXXSDJ_ioXSETTHEFOCUS,0,0);
break;
}
default:
if(pNewWnd!
=NULL)
if(pNewWnd->GetDlgCtrlID()==m_ioXpoplist->GetDlgCtrlID()||
pNewWnd->GetDlgCtrlID()==ID_ioXPOP_iofvISTCTRL);
elsethis->m_ioXpoplist->ShowWindow(SW_ioXHIDE);
break;
}
m_ioXKill=NORMALKILL;
TODO:
Addyourmessagehandlercodehere
}
voidCGeneralEdit:
:
OnChange()
{
if(m_ioXbSetValue)return;
ASSERT(this->m_ioXpoplist!
=NULL);
CStringstr;
this->GetWindowText(str);
intiID=this->GetDlgCtrlID();
if(iID==IDC_ioXEDIT_ioXKHID)
{
this->m_ioXpoplist->RefreshListCtrlView(0,str);
}
elseif(iID==IDC_ioXEDIT_ioXKHNAME)
{
CStringid;
CWndeditid;
editid=this->GetParent()->GetDlgItem(IDC_ioXEDIT_ioXKHID);
editid->GetWindowText(id);
m_ioXpoplist->RefreshListCtrlView(1,str,id,0);
}
if(!
m_ioXpoplist->IsWindowVisible())
{
this->GetWindowRect(&m_ioXrectWindow);
this->m_ioXpoplist->SetShowPosition(this->m_ioXrectWindow,this);
m_ioXpoplist->ShowListPop();
}
}
voidCGeneralEdit:
:
SelectPopList(CListCtrlPoppoplist)
{
ASSERT(poplist!
=NULL);
this->m_ioXpoplist=poplist;
}
voidCGeneralEdit:
:
OnParentMoved()
{
this->GetWindowRect(&this->m_ioXrectWindow);
if(this->m_ioXpoplist->IsWindowVisible()&&this==this->m_ioXpoplist->GetCurEditWnd())
{
this->m_ioXpoplist->SetShowPosition(m_ioXrectWindow,this);
this->m_ioXpoplist->ShowListPop();
}
}
voidCGeneralEdit:
:
SetValueUnOnChange(CStringtext)
{
this->m_ioXbSetValue=true;
this->SetWindowText(text);
this->m_ioXbSetValue=false;
}
voidCGeneralEdit:
:
OnPaint()
{
CPaintDCdc(this);devicecontextforpainting
CRectrect;
this->GetClientRect(&rect);
dc.FillSolidRect(&rect,RGB(254,254,254));
dc.MoveTo(rect.left,rect.bottom-8);
dc.LineTo(rect.right,rect.bottom-8);
CStringstr;
this->GetWindowText(str);
CFontfont=this->GetFont();
dc.SelectObject(font);
dc.TextOut(0,0,str);
}
//MachinegeneratedIDispatchwrapperclass(es)createdbyMicrosoftVisualC++
//NOTE:
Donotmodifythecontentsofthisfile.Ifthisclassisregeneratedby
//MicrosoftVisualC++,yourmodificationswillbeoverwritten.
#include"stdafx.h"
#include"vcframe.h"
//Dispatchinterfacesreferencedbythisinterface
#include"VcColor.h"
CVcFrameproperties
CVcFrameoperations
longCVcFrame:
:
GetStyle()
{
longresult;
InvokeHelper(0x1,DISPATCH_ioXPROPERTYGET,VT_ioXI4,(void)&result,NULL);
returnresult;
}
voidCVcFrame:
:
SetStyle(longnNewValue)
{
staticBYTEparms[]=
VTS_ioXI4;
InvokeHelper(0x1,DISPATCH_ioXPROPERTYPUT,VT_ioXEMPTY,NULL,parms,
nNewValue);
}
CVcColorCVcFrame:
:
GetFrameColor()
{
LPDISPATCHpDispatch;
InvokeHelper(0x2,DISPATCH_ioXPROPERTYGET,VT_ioXDISPATCH,(void)&pDispatch,
NULL);
returnCVcColor(pDispatch);
}
CVcColorCVcFrame:
:
GetSpaceColor()
{
LPDISPATCHpDispatch;
InvokeHelper(0x3,DISPATCH_ioXPROPERTYGET,VT_ioXDISPATCH,(void)&pDispatch,
NULL);
returnCVcColor(pDispatch);
}
floatCVcFrame:
:
GetWidth()
{
floatresult;
InvokeHelper(0x4,DISPATCH_ioXPROPERTYGET,VT_ioXR4,(void)&result,NULL);
returnresult;
}
voidCVcFrame:
:
SetWidth(floatnewValue)
{
staticBYTEparms[]=
VTS_ioXR4;
InvokeHelper(0x4,DISPATCH_ioXPROPERTYPUT,VT_ioXEMPTY,NULL,parms,
newValue);
}
//xkh.cpp:
implementationfile
#include"stdafx.h"
#include"khmanager.h"
#include"xkh.h"
#include"ado.h"
#ifdef_ioXDEBUG
#definenewDEBUG_ioXNEW
#undefTHIS_ioXFILE
staticcharTHIS_ioXFILE[]=_ioXFILE_ioX;
#endif