[SHELL32] SHBrowseForFolder with BIF_EDITBOX should use new UI (#3532)

CORE-17506

- Convert some judgements against BIF_NEWDIALOGSTYLE to judgements against BIF_USENEWUI. Here BIF_USENEWUI == (BIF_NEWDIALOGSTYLE | BIF_EDITBOX).
- Remove WS_SIZEBOX window style from new UI dialog resource (IDD_BROWSE_FOR_FOLDER_NEW).
- Fix header layout.h for resizing without WS_SIZEBOX.
This commit is contained in:
Katayama Hirofumi MZ 2021-03-14 18:35:40 +09:00 committed by GitHub
parent ac507691fb
commit e1a5ba188e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 71 additions and 34 deletions

View file

@ -67,6 +67,16 @@ _layout_MoveGrip(LAYOUT_DATA *pData, HDWP hDwp OPTIONAL)
static __inline void
LayoutShowGrip(LAYOUT_DATA *pData, BOOL bShow)
{
UINT uSWP = SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE |
SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED;
DWORD style = GetWindowLongPtrW(pData->m_hwndParent, GWL_STYLE);
DWORD new_style = (bShow ? (style | WS_SIZEBOX) : (style & ~WS_SIZEBOX));
if (style != new_style)
{
SetWindowLongPtrW(pData->m_hwndParent, GWL_STYLE, new_style); /* change style */
SetWindowPos(pData->m_hwndParent, NULL, 0, 0, 0, 0, uSWP); /* frame changed */
}
if (!bShow)
{
ShowWindow(pData->m_hwndGrip, SW_HIDE);