Skip to content

Commit 7f69cb9

Browse files
committed
[WLANWIZ] Add observable UI implementation
1 parent ea189a3 commit 7f69cb9

32 files changed

+1710
-0
lines changed

dll/shellext/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ add_subdirectory(ntobjshex)
1313
add_subdirectory(sendmail)
1414
add_subdirectory(shellbtrfs)
1515
add_subdirectory(stobject)
16+
add_subdirectory(wlanwiz)
1617
add_subdirectory(zipfldr)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
project(SHELL)
3+
4+
remove_definitions(-D_WIN32_WINNT=0x502)
5+
add_definitions(-D_WIN32_WINNT=0xA00 -DNTDDI_VERSION=NTDDI_WIN10_FE)
6+
spec2def(wlanwiz.dll wlanwiz.spec ADD_IMPORTLIB)
7+
8+
list(APPEND SOURCE
9+
wlanwiz.cpp
10+
advsettings.cpp
11+
draw.cpp
12+
keyb.cpp
13+
scan.cpp
14+
subclassproc_lb.cpp
15+
subclassproc_btngb.cpp)
16+
17+
file(GLOB wlanwiz_rc_deps res/*.*)
18+
add_rc_deps(wlanwiz.rc ${wlanwiz_rc_deps})
19+
20+
add_library(wlanwiz MODULE
21+
${SOURCE}
22+
${CMAKE_CURRENT_BINARY_DIR}/wlanwiz.def
23+
wlanwiz.rc)
24+
25+
set_module_type(wlanwiz win32dll UNICODE)
26+
set_target_cpp_properties(wlanwiz WITH_EXCEPTIONS)
27+
target_link_libraries(wlanwiz cpprt cppstl uuid atl_classes)
28+
add_importlibs(wlanwiz version gdi32 user32 advapi32 comctl32 ole32 msvcrt msimg32 kernel32 shell32 shlwapi ntdll uxtheme wlanapi)
29+
add_cd_file(TARGET wlanwiz DESTINATION reactos/system32 FOR all)
30+
set_property(TARGET wlanwiz PROPERTY CXX_STANDARD 20)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* PROJECT: ReactOS Shell
3+
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4+
* PURPOSE: ReactOS Wizard for Wireless Network Connections (WLAN Advanced Settings)
5+
* COPYRIGHT: Copyright 2024-2025 Vitaly Orekhov <[email protected]>
6+
*/
7+
#include "main.h"
8+
9+
LRESULT CWlanWizard::OnAdvancedSettings(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
10+
{
11+
ATL::CStringW cswNetworkAdapterPath = L"";
12+
LPOLESTR lpwszNetConCLSID;
13+
CComPtr<IShellFolder> sfConn;
14+
LPITEMIDLIST pidl = NULL;
15+
LPCITEMIDLIST pidlChild = NULL;
16+
SHDESCRIPTIONID did = { 0 };
17+
18+
if (FAILED(SHGetSpecialFolderLocation(NULL, CSIDL_CONNECTIONS, &pidl)))
19+
goto Exit;
20+
21+
if (FAILED(SHBindToParent(pidl, IID_IShellFolder, reinterpret_cast<LPVOID*>(&sfConn), &pidlChild)))
22+
goto Exit;
23+
24+
if (FAILED(SHGetDataFromIDListW(sfConn, pidlChild, SHGDFIL_DESCRIPTIONID, &did, sizeof(did))))
25+
goto Exit;
26+
27+
if (FAILED(StringFromIID(did.clsid, &lpwszNetConCLSID)))
28+
goto Exit;
29+
30+
ILFree(pidl);
31+
sfConn.Release();
32+
cswNetworkAdapterPath.Format(L"::%s\\::%s", lpwszNetConCLSID, this->m_sGUID);
33+
34+
/* NT 5.1 & 5.2 would still try to open the property sheet if you unplug the adapter. */
35+
ShellExecuteW(NULL, L"properties", cswNetworkAdapterPath, NULL, NULL, SW_SHOWNORMAL);
36+
37+
Exit:
38+
this->ShowWindow(SW_HIDE);
39+
this->SendMessageW(WM_CLOSE);
40+
41+
return FALSE;
42+
}

0 commit comments

Comments
 (0)