Additionally:
- Reuse printers and fonts folder icons from shell32,
the same way as it was done in c0dbde0436.
The printers folder icon was missing here though.
- Fix "look_key" => "lock_key" typos.
This fixes Administrative Tools and Fonts Folder icons in Control Panel
when being restored to defaults with Stardock IconPackager 5.1.
CORE-19471
Add "My Documents" and "My Pictures" icons, with 100 and 101 identifiers
accordingly. They are duplicating the icons from shell32.
This fixes My Documents desktop icon becoming blank when reverting back
to the system default icons after applying 3rd party icon set in Stardock
IconPackager 5.1, and also fixes icons of some items in the application
preview dialog.
It's confirmed that mydocs.dll on Windows XP SP3 and Server 2003 SP2
includes these two icon resources with the said identifiers.
The icons there are being an exact copy from shell32 as well.
CORE-19471 CORE-14758
Display correct menu on right-dragging
an item in Folder explorer bar to Desktop.
JIRA issue: CORE-19474
In CExplorerBand::OnTreeItemDragging
method:
- Use GetAttributesOf to get the
attributes of a folder item.
- Use correct dwEffect value for
DoDragDrop call.
Used in `ATL::CStringW` and `ATL::CStringA`, for example:
```
ATL::CStringW cswItemText = "";
cswItemText.Preallocate(64);
SendDlgItemMessageW(pdis->CtlID, LB_GETTEXT, pdis->itemID, reinterpret_cast<LPARAM>(cswItemText.GetBuffer()));
cswItemText.ReleaseBuffer();
```
This public function is used to allocate memory for the string via private PrepareWrite, but it's missing somehow. Now it shouldn't be.
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE
m" with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
"STDMETHOD_(t, m)" (t is a type. m is a method
name).
- Use "override" keyword as possible.
- CDefView should inherit IShellView3 due to
override CreateViewWindow3 method.
- Fix CDefView::CreateViewWindow3 (parameter
prcView is const RECT *, not LPRECT).
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT
STDMETHODCALLTYPE m"
with "STDMETHOD(m)"
(m is a method name).
- Replace "virtual t
STDMETHODCALLTYPE m"
with "STDMETHOD_(t, m)"
(t is a type. m is a method name).
- Use "override" keyword as possible.
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT
STDMETHODCALLTYPE m" with
"STDMETHOD(m)" (m is a
method name).
- Replace "virtual t
STDMETHODCALLTYPE m"
with "STDMETHOD_(t, m)"
(t is a type. m is a method name).
- Use "override" keyword as possible.
Use correct icon index in SIC_OverlayShortcutImage() to properly load
shortcut overlay icon from registry instead of always using default icon.
This allows to use custom shortcut icon set by user, in case it was
specified there.
As FIXME comment stated, the icon indexes were not implemented in the far
past, so this workaround was badly required. But now they are implemented,
so no need to always use default resource from shell32, enable the correct
code instead.
Also adapt this to CShellLink::CreateShortcutIcon() when the shortcut icon
is being changed in its properties dialog, as well as in CNewMenu class
when displaying menu items for creating a new folder or a shortcut.
Addendum to f9a5344254. CORE-14758
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT
STDMETHODCALLTYPE m" with
"STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE
m" with "STDMETHOD_(t, m)"
(t is a type. m is a method name).
- Use "override" keyword as possible.
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE m"
with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
"STDMETHOD_(t, m)" (t is a type. m is a method
name).
- Use override keyword as possible.
For simplicity and short typing.
JIRA issue: CORE-19469
- Replace "virtual HRESULT STDMETHODCALLTYPE
m" with "STDMETHOD(m)" (m is a method name).
- Replace "virtual t STDMETHODCALLTYPE m" with
"STDMETHOD_(t, m)" (t is a type. m is a method
name).
- Use "override" keyword as possible.
Follow-up to #6550. Avoid same name
overwriting.
JIRA issue: CORE-5866
- Rename the filename if there was duplicate.
- Simplify CreateShortcut function.
- Rename IDC_SHORTCUT_LOCATION as
IDC_LINK_LOCATION to resolve name conflict
with shell32/shresdef.h.
proper accelerators for en-US (like english 2k3sp2)
proper accelerators for de-DE (like german XPSP3)
slightly improved accelerators for fr-FR
and mark existing accelerator collisions for all other languages with FIXME-comments.
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com> for ukrainian header
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org> for fr-FR
I have a plan to implement
shell32!SHRestricted correctly.
JIRA issue: CORE-11515
In the testcase:
- Get procedure SHGetRestriction
from shlwapi.dll.
- Call SHGetRestriction to test and
check the results.
I have a plan to implement
shell32!SHRestricted correctly.
JIRA issue: CORE-11515
- Get SHRestricted and
SHSettingsChanged procedures
from shell32.dll.
- Use them and check the results.
Implement proper reading the current user's icons from registry.
CORE-14758
- Load the icons specified by user in registry in the following keys:
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}\DefaultIcon"
(virtual namespace folders)
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons"
(filesystem folders and drives)
- Implement two functions HCU/HLM_GetIconW for reading the icons
from mentioned HKCU and HKLM keys accordingly.
- Use HCR_RegGetIconW for falling back to default icons.
This function always loads only default icons, even when
the custom ones are specified by user.
- Refactor SIC_LoadOverlayIcon to use newly implemented HLM_GetIconW.
These changes apply to:
- virtual namespace folders and other desktop items (like My Computer,
My Documents, Network Places, Recycle Bin, Web Browser (aka Internet
Explorer), Control Panel and some of its items);
- normal filesystem directories;
- all types of drives (fixed disk drives, removable drives, CD-ROMs,
RamDisks and network drives). Handle invalid drives, setting blank
icon for them, since they cannot be recognized or mounted correctly.
Also, load the autorun icons first to avoid overriding them by the
icons defined in registry.
I've rechecked twice: excluding Start Menu icons, Desktop Workspace icon
and some FS folder icons that have their own desktop.ini configuration
files (we probably should write the custom icons we load to these configs,
as Windows does it, perhaps with WritePrivateProfileStringW), all other
icons can be changed now (only ones that can be changed on XP SP3 / 2003
SP2) via built-in system tools (like Desktop icons in desk.cpl) or any
3rd-party tools without modifying system resources.
Also all icons for the known file types can be changed,
same as before my changes.
Regarding Start Menu icons:
- changing them should be correctly implemented in explorer
instead of shell32, as the former is responsible for the Start Menu
and partially for the taskbar;
- in order to actually use all of them, we need to implement modern
Start Menu first.
Useful reference: http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0162.htm
Follow-up to #6552. There was
a bug that the cropped selection
image is not the shape of selection.
JIRA issue: CORE-19466
- Extend SelectionModel::
DrawSelection for drawing
selection flexibly.
- Improve SelectionModel::
GetSelectionContents method.
JIRA issue: CORE-17453, CORE-12328
In CMenuBand::_TrackContextMenu method:
- Use 100 for idCmdFirst, instead of zero.
- Use uCommand - idCmdFirst for cmi.lpVerb.
Zero is an invalid command ID.
Now we can open special folder shortcut, thanks to #6546.
Let's allow users to create various shortcut files.
JIRA issue: CORE-5866
- Remove BIF_RETURNONLYFSDIRS flag because
the system can open special folder shortcuts now.
- Add LPITEMIDLIST pidlTarget to CREATE_LINK_CONTEXT
structure.
- Use pidlTarget if the target is a special folder.
- Fix CShellLink::DoOpen for arguments.
pszDisplayName is for display name, not for full path.
JIRA issue: CORE-5866
- If lpBrowseInfo->pszDisplayName is valid,
use SHGetFileInfoW to get display name.
- Don't use SHGetPathFromIDListW to get
display name. It's wrong.
Retrial of #5052. Improve keyboard
interface usability.
JIRA issue: CORE-18823
- Add GetAddressBarAccessKey
helper function to get the
accelerator of Address bar from
resource string
IDS_ADDRESSBANDLABEL.
- Implement Alt+D (or something)
accelerator in CAddressBand::
TranslateAcceleratorIO method by
handling WM_SYSKEYDOWN and
WM_SYSCHAR messages.