mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[SHELL32] Don't show taskbar button of file property sheet (#1085)
CORE-10481
This commit is contained in:
parent
3f570f3369
commit
ecd51d99f4
1 changed files with 21 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright 2005 Johannes Anderwald
|
||||
* Copyright 2012 Rafal Harabien
|
||||
* Copyright 2017 Katayama Hirofumi MZ
|
||||
* Copyright 2017-2018 Katayama Hirofumi MZ
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -67,6 +67,17 @@ LoadPropSheetHandlers(LPCWSTR pwszPath, PROPSHEETHEADERW *pHeader, UINT cMaxPage
|
|||
return cPages;
|
||||
}
|
||||
|
||||
// CStubWindow32 --- The owner window of file property sheets.
|
||||
// This window hides taskbar button of property sheet.
|
||||
class CStubWindow32 : public CWindowImpl<CStubWindow32>
|
||||
{
|
||||
public:
|
||||
DECLARE_WND_CLASS_EX(_T("StubWindow32"), 0, COLOR_WINDOWTEXT)
|
||||
|
||||
BEGIN_MSG_MAP(CPaletteWindow)
|
||||
END_MSG_MAP()
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* SH_ShowPropertiesDialog
|
||||
|
@ -104,10 +115,17 @@ SH_ShowPropertiesDialog(LPCWSTR pwszPath, LPCITEMIDLIST pidlFolder, PCUITEMID_CH
|
|||
if (PathIsRootW(wszPath))
|
||||
return SUCCEEDED(SH_ShowDriveProperties(wszPath, pidlFolder, apidl));
|
||||
|
||||
DWORD style = WS_DISABLED | WS_CLIPSIBLINGS | WS_CAPTION;
|
||||
DWORD exstyle = WS_EX_WINDOWEDGE | WS_EX_APPWINDOW;
|
||||
CStubWindow32 stub;
|
||||
if (!stub.Create(NULL, NULL, NULL, style, exstyle))
|
||||
return E_FAIL;
|
||||
|
||||
/* Handle files and folders */
|
||||
PROPSHEETHEADERW Header;
|
||||
memset(&Header, 0x0, sizeof(PROPSHEETHEADERW));
|
||||
Header.dwSize = sizeof(PROPSHEETHEADERW);
|
||||
Header.hwndParent = stub;
|
||||
Header.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE;
|
||||
Header.phpage = hppages;
|
||||
Header.pszCaption = PathFindFileNameW(wszPath);
|
||||
|
@ -142,6 +160,8 @@ SH_ShowPropertiesDialog(LPCWSTR pwszPath, LPCITEMIDLIST pidlFolder, PCUITEMID_CH
|
|||
if (pFileDefExt)
|
||||
pFileDefExt->Release();
|
||||
|
||||
stub.DestroyWindow();
|
||||
|
||||
return (Result != -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue