/* static */ BaseWindow* BaseWindow::Lookup(HWND handle) { KeyType const key = KeyType(handle); ConstIterator const i_window = msMap.find(key); BaseWindow* result = NULL; if (i_window != msMap.end()) { result = i_window->second; ASSERT(result != NULL); } else if (mspNewlyCreatedWindow != NULL) { result = mspNewlyCreatedWindow; mspNewlyCreatedWindow = NULL; result->SetHandle(handle); } return result; }