   "PE",
   "UK",
   "VN",
-  "NEW"
 };
 
-char m_CountryNames[COUNTRY_CNT][15] = {
+char m_CountryNames[COUNTRY_CNT][10] = {
   "USA",
   "Brazil",
   "Canada",

  "Peru",
  "England",
  "Vietnam",
  "New Country"
};


char* searchCountryCode(char* countryName) {
   
   for(int i=0; i<COUNTRY_CNT-1; i++) {
      if (strcmp(countryName,(char*)&m_CountryNames[i]) == 0) {
         return m_CountryCodes[i];
      }
   }
   // take care of case where we have "New Country1", "NewCountry2" and so on...
   if (strncmp(countryName,m_pNewCountry,11) == 0) {
     sprintf(m_NewCode,"%s%s","NEW",(char*)&countryName[11]);
     return m_NewCode;
   }
   return m_pEmptyStr;
}



    switch (pElem->nId) {
//<Button Enums !Start!>
      case E_BTN_ADD:
        sprintf(acTxt,"New Country%d",m_nNumNewCountry+1);
        if (gslc_ElemXListboxInsertItemAt(&m_gui,m_pElemListbox,0,acTxt)) {
          // successfully added new country
          m_nNumNewCountry++;
          gslc_ElemSetTxtStr(&m_gui, m_pElemSel, searchCountryCode(acTxt));
        } else {
          gslc_ElemSetTxtStr(&m_gui, m_pElemSel, "");
          gslc_PopupShow(&m_gui, E_PG_WARNING, true);
        }
        break;
