void CShowMenu::InsertMenu(int subpos,int pos,DWORD dwMenuItemID,const char* pszMenuStr) { BCMenu* pSubMenu = (BCMenu*)m_pMenu->GetSubMenu(subpos); string strInput = pszMenuStr; int iPos = -1; while( (iPos = strInput.find('&',iPos+1)) != string::npos ) { string strLeft = strInput.substr(0,iPos); string strRight = strInput.substr(iPos,strInput.length()-iPos+1); iPos++; strInput = strLeft + string("&") + strRight; } pSubMenu->InsertMenu( pos,MF_BYPOSITION|MF_STRING,dwMenuItemID,strInput.c_str() ); }
void CShowMenu::InsertMenu(int subpos,int pos, UINT nFlag) { BCMenu* pSubMenu = (BCMenu*)m_pMenu->GetSubMenu(subpos); pSubMenu->InsertMenu( pos, nFlag ); }