+ // Check if there is SEARCHSETTINGS_MAX controls set or more, only
+ // enable the remove button if this is the case.
+
+ if (SearchFrames.size() >= SEARCHSETTINGS_MAX){
+
+ for (std::map<int, void*>::iterator siter = SearchFrames.begin();
+ siter != SearchFrames.end(); siter++){
+
+ XABSearchPanel *XABSPPtr = static_cast<XABSearchPanel*>(SearchFrames.begin()->second);
+ XABSPPtr->EnableButtons(FALSE, TRUE);
+
+ }
+ return;
+
+ }
+