X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=dll%2Fwin32%2Fbrowseui%2Fshellfind%2FCSearchBar.cpp;h=13f86900b6b35195824ebbd9c539b65fb5f2410b;hp=4ce639fcaa67b50622ffe16a05a8ec32094be55c;hb=dce5ccec4e719675e4c0d715c7fdd4b2e6a3f2cf;hpb=3b9508e98fc03708f9f46cd784684db9e68fbafd diff --git a/dll/win32/browseui/shellfind/CSearchBar.cpp b/dll/win32/browseui/shellfind/CSearchBar.cpp index 4ce639fcaa6..13f86900b6b 100644 --- a/dll/win32/browseui/shellfind/CSearchBar.cpp +++ b/dll/win32/browseui/shellfind/CSearchBar.cpp @@ -250,16 +250,24 @@ LRESULT CSearchBar::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandl ((CWindow)GetDlgItem(IDC_SEARCH_LABEL)).SetWindowPos(NULL, 0, 0, iWidth - iPadding, 40, SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER); - HWND inputs[] = { GetDlgItem(IDC_SEARCH_FILENAME), GetDlgItem(IDC_SEARCH_QUERY), GetDlgItem(IDC_SEARCH_COMBOBOX), GetDlgItem(IDC_SEARCH_BUTTON), GetDlgItem(IDC_SEARCH_STOP_BUTTON), GetDlgItem(IDC_PROGRESS_BAR) }; + int inputs[] = { IDC_SEARCH_FILENAME, IDC_SEARCH_QUERY, IDC_SEARCH_COMBOBOX, IDC_SEARCH_BUTTON, IDC_SEARCH_STOP_BUTTON, IDC_PROGRESS_BAR }; + HDWP hdwp = BeginDeferWindowPos(_countof(inputs)); for (SIZE_T i = 0; i < _countof(inputs); i++) { - CWindow wFileName = (CWindow) inputs[i]; + CWindow wnd = (CWindow) GetDlgItem(inputs[i]); RECT rect; - wFileName.GetWindowRect(&rect); + wnd.GetWindowRect(&rect); POINT pt = { rect.left, rect.top }; ScreenToClient(&pt); - wFileName.MoveWindow(iPadding, pt.y, iWidth - iPadding * 2, rect.bottom - rect.top); + hdwp = wnd.DeferWindowPos(hdwp, + HWND_TOP, + iPadding, + pt.y, + iWidth - iPadding * 2, + rect.bottom - rect.top, + SWP_NOZORDER | SWP_NOACTIVATE); } + EndDeferWindowPos(hdwp); return 0; } @@ -471,7 +479,7 @@ HRESULT STDMETHODCALLTYPE CSearchBar::GetClassID(CLSID *pClassID) { if (!pClassID) return E_POINTER; - memcpy(pClassID, &CLSID_FileSearchBand, sizeof(CLSID)); + *pClassID = CLSID_FileSearchBand; return S_OK; }