| 195 | } |
| 196 | |
| 197 | STDMETHODIMP CTabbedMDIChildModifiedList::Insert( |
| 198 | long index, ITabbedMDIChildModifiedItem* item) |
| 199 | { |
| 200 | HRESULT hr = E_INVALIDARG; |
| 201 | |
| 202 | POSITION pos = this->FindIndex(index); |
| 203 | if(pos != NULL) |
| 204 | { |
| 205 | this->InsertBefore(pos, item); |
| 206 | hr = S_OK; |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | this->AddTail(item); |
| 211 | hr = S_OK; |
| 212 | } |
| 213 | |
| 214 | if(SUCCEEDED(hr)) |
| 215 | { |
| 216 | // Set the parent list as ourselves, but only after |
| 217 | // we really have added it to our collection of items |
| 218 | item->putref_ParentList(this); |
| 219 | } |
| 220 | return hr; |
| 221 | } |
| 222 | |
| 223 | STDMETHODIMP CTabbedMDIChildModifiedList::InsertList( |
| 224 | long index, ITabbedMDIChildModifiedList* list) |
no test coverage detected