本文整理汇总了C++中CByteArray::InsertAt方法的典型用法代码示例。如果您正苦于以下问题:C++ CByteArray::InsertAt方法的具体用法?C++ CByteArray::InsertAt怎么用?C++ CByteArray::InsertAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CByteArray
的用法示例。
在下文中一共展示了CByteArray::InsertAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateExtUserParams
//----------------------------- FUNCTION -------------------------------------*
void PropGSDModule::CreateExtUserParams()
{
DWORD dwCurrentPos;
CByteArray UserParam;
UserParam.RemoveAll();
ExtParam* pParam = NULL;
int offset = 0;
UserParam.InsertAt(0, &m_DefaultUserPrmData);
dwCurrentPos = UserParam.GetSize();
if (m_bExtUserPrms) {
// This sets all default parameter and of unused ExtUserPrms
POSITION pos = ExtUserParams.GetHeadPosition();
while (pos) {
pParam = (ExtParam*)ExtUserParams.GetNext(pos);
ModifyParamArray(UserParam,pParam);
}// end while of unused UserPrms
}
//actualize current position for appending the modules
dwCurrentPos = UserParam.GetSize();
// create UserParams and add them to the UserParam Array
m_pModule->GetUsedModules(&arModules);
int index = arModules.GetSize();
for (int i = 0; i < index; i++) {
CDP_Module* pModule = (CDP_Module*)arModules.GetAt(i);
if (pModule->GetUserPrmLen() == 0)
continue;
CByteArray ModuleParam;
ModuleParam.RemoveAll();
ModuleParam.InsertAt(0, 0x00, pModule->GetUserPrmLen());
CObList* pParamList = pModule->GetExtParams();
POSITION pos = pParamList->GetHeadPosition();
while (pos) {
pParam = (ExtParam*)pParamList->GetNext(pos);
ModifyParamArray(ModuleParam,pParam);
}
UserParam.InsertAt(dwCurrentPos, &ModuleParam);
dwCurrentPos += pModule->GetUserPrmLen();
}
// set new userprms and show in EditCtrl
m_ExtUserPrmData.RemoveAll();
m_ExtUserPrmData.Copy(UserParam);
if (::IsWindow(m_ctrlUserPrm.m_hWnd))
m_ctrlUserPrm.SetHexContent(m_ExtUserPrmData.GetData(), m_ExtUserPrmData.GetSize());
}