Articles and Threads That Actually Operate or Test explorer.exe Windows and Tabs Using SendMessage / PostMessage
This collection gathers articles and threads—mainly in Japanese, but also with technically substantial English content—that explore or verify direct manipulation of File Explorer (explorer.exe) windows or “tabs” through Windows messaging (SendMessage, PostMessage).
-
Stack Overflow: “Opening Folder in New Tab of Existing Shell Window” Clearly states that sending the undocumented
WM_COMMAND0xA21B (41499) toShellTabWindowClassin Windows 11’s Explorer opens a new tab. Provides both a UI Automation approach and an example ofSendMessage(hwnd, WM_COMMAND, 0xA21B, 0), complete with technical reasoning and code. (Stack Overflow) -
NXTED (Japanese): “【C#】Controlling Other Windows” Uses
FindWindow("CabinetWClass", …)to get Explorer’s HWND and performsPostMessage(WM_COMMAND, 0x0000A21B, 0)to add a new tab. Demonstrates additional experiments such as focusing the address bar (WM_COMMAND0x00001006) and enumerating tab headers (ShellTabWindowClass) with embedded code samples. (note) -
NXTED (Japanese): “【C#】Controlling Other Windows (Preparation)” A prequel to the above, documenting prior research into Explorer class names and message parameters used when adding tabs. The detailed findings are compiled on the company’s blog. (nxted.co.jp)
-
NirSoft “GUIPropView” Help A command-line tool for sending operations to any window. Includes an example:
/Action SendCommand 28751 Class:CabinetWClass Child.Class:ShellTabWindowClasswhich switches Explorer to Large Icons view. This is a real-world example of sendingWM_COMMANDmessages to a child window (ShellTabWindowClass). (NirSoft) -
(Older but insightful) petitmonte BBS: “How to Hide the Explorer Toolbar?” Discussion from the Windows XP era showing how to target
CabinetWClasswith commands likeSendMessage(WM_COMMAND, 0xA204, …)to manipulate toolbar items. Also covers identifying command IDs using Spy++. Serves as a historical reference on sendingWM_COMMANDto Explorer. (petitmonte.com)
-
“Working with Explorer Tabs” (AutoHotkey Forum) A shared set of functions for enumerating and activating Windows 11 Explorer tabs, using a mix of SendMessage, UIA, and COM. Discusses tab-level handle manipulation strategies. (autohotkey.com)
-
“Activating a File Explorer Tab in Windows 11” (AutoHotkey Forum) Trial-and-error discussion on how to activate a specific tab. Notes that
WinActivateonly affects the current tab, prompting exploration of message-based targeting via tab HWNDs. (autohotkey.com) -
Reddit: “Force Windows 11 to Open File Explorer in New Tab” Shares an AutoHotkey script that forces new Explorer windows to open as new tabs. Some variants send
SendMessage(0x0111, 0xA21B, …)toShellTabWindowClass. (Reddit)
-
Official
WM_COMMANDDocumentation (Microsoft Learn) Explains the meaning ofwParam/lParamand the structure for menus, accelerators, and control notifications. Since Explorer’s command IDs are partially undocumented, this helps interpret technical findings. (Microsoft Learn) -
Official
SendMessageWDocumentation (Microsoft Learn) Covers process boundaries and UIPI restrictions when sending messages across processes. Because Explorer runs as a separate standard-rights process, messages from an admin process can be blocked by UIPI. (Microsoft Learn)
-
Target Window Classes The main window is
CabinetWClass; tab-related elements are underShellTabWindowClass. Some examples sendWM_COMMANDto the parent (CabinetWClass), others to the child (ShellTabWindowClass). (note) -
Key Verified Commands (Windows 11 22H2+)
- 0xA21B (41499) — “New Tab” (undocumented, may change in future). Usually sent to
ShellTabWindowClass, though some reports succeed when sent to the parent. (Stack Overflow) - 0x1006 — Focus address bar (observed in experiments). (note)
- 28751 — Switch to “Large Icons” view (from GUIPropView). (NirSoft)
- 0xA21B (41499) — “New Tab” (undocumented, may change in future). Usually sent to
⚠️ Undocumented Command IDs These IDs are not officially supported and may change with Windows updates. Behavior can vary by build or locale. Safest practice: use tools like Spy++, Inspect, or Accessibility Insights to verify IDs locally before relying on them. (Stack Overflow)
-
UI Automation (UIA) Invokes the “+ (New Tab)” button with
AutomationId = AddButton. More resistant to language or build differences. Example UIA code and investigation steps are shown in the Stack Overflow thread. (Stack Overflow) -
COM Interfaces:
IShellWindows,IWebBrowserApp,Navigate2Once a tab is opened, it appears as a window from the COM perspective. Using COM to catch and navigate the target view is a more stable, long-term method. (Stack Overflow)
- For quick experiments → Try
WM_COMMAND 0xA21Bas shown in the articles (at your own risk). (Stack Overflow) - For future-proof solutions → Prefer UI Automation for tab creation and COM (
IShellWindows) for navigation; use SendMessage as a supplementary technique. (Stack Overflow)