Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.12] Nmc/2278-welcome popup wizard #168

Closed
wants to merge 58 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
83d478f
Advert window opening mechanism added
Jan 17, 2024
e728c43
Added 3 screens and a simple loading mechanism
Jan 17, 2024
2b046c1
Added timer and timeout image switch
Jan 17, 2024
b786a62
Added button with text
Jan 18, 2024
26dca3b
Added QPushButton and asigned to action
Jan 18, 2024
c60b506
Added text and arrows
Jan 18, 2024
a342ba8
Fixed image loading
Jan 18, 2024
9b07f5d
Fixed scroll bug
Jan 18, 2024
28d7890
Added docstrings
Jan 19, 2024
3c9ee95
Gitignore and correct icons
Jan 23, 2024
9c5535f
Changed cmake
Feb 1, 2024
ef56860
Changed cmake
Feb 1, 2024
9fb2604
Gitignore fixed
Feb 1, 2024
4702809
FIxed cmake
Feb 2, 2024
0bb1d7b
USe rcc file
Feb 5, 2024
cab35ee
clean up qrc file
Feb 5, 2024
01c8923
new rcc
Feb 5, 2024
4501ea7
Trigger Build
Feb 6, 2024
72bd32c
adjusted main and cmake
Feb 18, 2024
da21e80
Use QCoreApplication::translate(...) function
Feb 20, 2024
abcc615
Update .gitignore
memurats Apr 29, 2024
0a9b3d3
Update CMakeLists.txt
memurats Apr 29, 2024
ce7ac68
Update CMakeLists.txt
memurats Apr 29, 2024
38b6dfa
Update main.cpp
memurats Jun 3, 2024
418851d
Delete nmctheme_v1.rcc
memurats Jun 4, 2024
23812fa
use the proper name when reading system exclude config file
mgallien Mar 22, 2024
b8c43d9
Revert "Allow installation to close shell extension DLLs via the cust…
mgallien Mar 26, 2024
7313251
context menu: do not recursively check pin and availability states
mgallien Mar 22, 2024
9c7ca6b
properly compute if a folder is top level or child extern mounted
mgallien Mar 25, 2024
0f70529
adjust AppImage build script to the new build image
mgallien Feb 7, 2024
3028157
prepare 3.12.3 release
mgallien Mar 28, 2024
c2a7702
Bugfix. Remove seen call notifications from the list.
allexzander Mar 20, 2024
d5b311e
Bugfix/folder conflict disappear
allexzander Apr 23, 2024
19d170e
create registry keys needed for edit locally in local machine category
mgallien Apr 23, 2024
d9aeee4
if a virtual file change but bothing changed: set it as in sync
mgallien Apr 11, 2024
fdea443
do not cause implicit hydration of virtual files during sync
mgallien Apr 3, 2024
30a027d
Detect office files for locking on new upload. Notify FolderWatcher.
allexzander Apr 3, 2024
861f2b7
Extract syncIsPaused initialisation into new updater slot
claucambra Mar 27, 2024
3fea6d3
Make sure to emit relevant signals and set sync is paused to true if …
claucambra Mar 27, 2024
ef81753
Make sure to emit syncIsPausedChanged in syncIsPaused setter
claucambra Mar 27, 2024
4b38fd3
Re-run update sync paused state slot when folder list has changed
claucambra Mar 27, 2024
c8972f4
Merge pull request #6696 from nextcloud/bugfix/conflictdialog-multipl…
mgallien Apr 25, 2024
acd1c82
Merge pull request #6691 from nextcloud/bugfix/slow-sync-with-tray-open
allexzander Apr 25, 2024
fca183d
Fix "false" error about bad applying of nodiscard to value type
claucambra Mar 27, 2024
5918220
Give debug archive save location dialog a default location
claucambra Apr 1, 2024
ea1af80
Prevent crash on creating debug archive in non-writeable location
claucambra Apr 1, 2024
be10e86
Only show successful debug archive creation dialog if it has indeed b…
claucambra Apr 1, 2024
0c3ad08
prepare 3.12.4 release
allexzander Apr 25, 2024
e55c774
Bugfix. Files lock. Fix incorrect readonly state.
allexzander Apr 22, 2024
d5ffc9e
release 3.12.5
mgallien May 3, 2024
dbff947
USe rcc file
Feb 5, 2024
0fd7f2c
Trigger Build
Feb 6, 2024
c8e9caf
Update CMakeLists.txt
memurats Apr 29, 2024
4cf82e4
only use VFS update instruction when sync engine would do nothing
mgallien Jun 19, 2024
076627b
USe rcc file
Feb 5, 2024
8817021
Trigger Build
Feb 6, 2024
90f90e7
Update CMakeLists.txt
memurats Apr 29, 2024
a48d479
Trigger Build
Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)

set ( NCCONTEXTMENU_SHELLEXT_WINDOW_CLASS_NAME "${APPLICATION_SHORTNAME}_Shxt_CntMenuHndlr_WndClass" )
set ( NCOVERLAYS_SHELLEXT_WINDOW_CLASS_NAME "${APPLICATION_SHORTNAME}_Shxt_Ovs_WndClass" )

# CfAPI Shell Extensions
set( CFAPI_SHELL_EXTENSIONS_LIB_NAME CfApiShellExtensions )

set ( CFAPI_SHELLEXT_WINDOW_CLASS_NAME "${APPLICATION_SHORTNAME}_${CFAPI_SHELL_EXTENSIONS_LIB_NAME}_WndClass" )

set( CFAPI_SHELLEXT_APPID_REG "{E314A650-DCA4-416E-974E-18EA37C213EA}")
set( CFAPI_SHELLEXT_APPID_DISPLAY_NAME "${APPLICATION_NAME} CfApi Shell Extensions" )
Expand Down
6 changes: 5 additions & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set( MIRALL_VERSION_MAJOR 3 )
set( MIRALL_VERSION_MINOR 12 )
set( MIRALL_VERSION_PATCH 2 )
set( MIRALL_VERSION_PATCH 5 )
set( MIRALL_VERSION_YEAR 2024 )
set( MIRALL_SOVERSION 0 )

Expand All @@ -13,6 +13,10 @@ set(NEXTCLOUD_SERVER_VERSION_SECURE_FILEDROP_MIN_SUPPORTED_MAJOR 26)
set(NEXTCLOUD_SERVER_VERSION_SECURE_FILEDROP_MIN_SUPPORTED_MINOR 0)
set(NEXTCLOUD_SERVER_VERSION_SECURE_FILEDROP_MIN_SUPPORTED_PATCH 0)

set(NEXTCLOUD_SERVER_VERSION_MOUNT_ROOT_PROPERTY_SUPPORTED_MAJOR 28)
set(NEXTCLOUD_SERVER_VERSION_MOUNT_ROOT_PROPERTY_SUPPORTED_MINOR 0)
set(NEXTCLOUD_SERVER_VERSION_MOUNT_ROOT_PROPERTY_SUPPORTED_PATCH 3)

if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
set( MIRALL_VERSION_SUFFIX "git") #e.g. beta1, beta2, rc1
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
Expand Down
2 changes: 1 addition & 1 deletion admin/linux/build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ chmod a+x linuxdeployqt.AppImage
rm ./linuxdeployqt.AppImage
cp -r ./squashfs-root ./linuxdeployqt-squashfs-root
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu
./squashfs-root/AppRun ${DESKTOP_FILE} -bundle-non-qt-libs -qmldir=${DESKTOP_CLIENT_ROOT}/src/gui

# Set origin
Expand Down
34 changes: 7 additions & 27 deletions admin/win/msi/Nextcloud.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,18 @@
<FileSearch Id="LegacyUninstallFileName" Name="Uninstall.exe"/>
</RegistrySearch>
</Property>

<Property Id="IS_PREV_VERSION_SHELL_EXT_CLOSE_SUPPORTED">
<RegistrySearch Id="RegIsPrevVersionShellExtCloseSupported" Type="raw" Root="HKLM" Key="Software\$(var.AppVendor)\$(var.AppName)" Name="isShellExtCloseSupported" Win64="$(var.PlatformWin64)" />
</Property>

<!-- Property to disable update checks -->
<Property Id="SKIPAUTOUPDATE" Value="0" />

<!-- Quit / restart application -->
<util:RestartResource ProcessName="$(var.AppExe)" />

<Property Id="WNDCLASSNAMETOCLOSE" Value="$(var.CfApiShellextWndClassName)" />
<CustomAction Id="SetCfApiWindowClassName" Property="WNDCLASSNAMETOCLOSE" Value="$(var.CfApiShellextWndClassName)" />
<CustomAction Id="SetNCContextMenuWindowClassName" Property="WNDCLASSNAMETOCLOSE" Value="$(var.NCContextMenuShellextWndClassName)" />
<CustomAction Id="SetNCOverlaysWindowClassName" Property="WNDCLASSNAMETOCLOSE" Value="$(var.NCOverlaysShellextWndClassName)" />

<!-- Helper DLL Custom Actions -->
<!-- Helper DLL Custom Actions -->
<SetProperty Id="ExecNsisUninstaller" Value="&quot;$(var.AppShortName)&quot; &quot;[NSIS_UNINSTALLEXE]&quot;" Before="ExecNsisUninstaller" Sequence="execute" />
<SetProperty Id="RemoveNavigationPaneEntries" Value="&quot;$(var.AppName)&quot;" Before="RemoveNavigationPaneEntries" Sequence="execute" />

<InstallExecuteSequence>
<Custom Action="SetCfApiWindowClassName" Before="InstallValidate"/>
<Custom Action="CloseCfApiShellExtension" After="SetCfApiWindowClassName" />
<Custom Action="SetNCContextMenuWindowClassName" After="CloseCfApiShellExtension"/>
<Custom Action="CloseNCContextMenuShellExtension" After="SetNCContextMenuWindowClassName" />
<Custom Action="SetNCOverlaysWindowClassName" After="CloseNCContextMenuShellExtension"/>
<Custom Action="CloseNCOverlaysShellExtension" After="SetNCOverlaysWindowClassName" />
<!-- Install: Remove previous NSIS installation, if detected -->
<Custom Action="ExecNsisUninstaller" Before="ProcessComponents">NSIS_UNINSTALLEXE AND NOT Installed</Custom>

Expand All @@ -95,8 +80,9 @@

<!-- Uninstall: Cleanup the Registry -->
<Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<!-- Schedule Reboot for the Shell Extensions (only if SCHEDULE_REBOOT argument is set or if th version is less than 3.12.2 -->
<ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR ((NOT (UILevel=2)) AND (NOT IS_PREV_VERSION_SHELL_EXT_CLOSE_SUPPORTED))</ScheduleReboot>

<!-- Schedule Reboot for the Shell Extensions (in silent installation mode only, or if SCHEDULE_REBOOT argument is set-->
<ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR NOT (UILevel=2)</ScheduleReboot>
</InstallExecuteSequence>

<!-- "Add or Remove" Programs Entries -->
Expand Down Expand Up @@ -198,11 +184,6 @@
<RegistryValue Type="string" Name="InstallerProductCode" Value="[ProductCode]" />
</RegistryKey>
</Component>
<Component Id="RegistryMiscInfo" Guid="*" Win64="$(var.PlatformWin64)">
<RegistryKey Root="HKLM" Key="Software\$(var.AppVendor)\$(var.AppName)">
<RegistryValue Type="integer" Name="isShellExtCloseSupported" Value="1" />
</RegistryKey>
</Component>

<!-- Platform bitness-dependent settings -->
<Component Id="RegistryDefaultSettings" Guid="*" Win64="$(var.PlatformWin64)">
Expand All @@ -213,14 +194,14 @@
</Component>
<!-- Register URI handler -->
<Component Id="RegistryUriHandler" Guid="*" Win64="$(var.PlatformWin64)">
<RegistryKey Root="HKCU" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Root="HKLM" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="URL:$(var.AppName) Protocol" />
<RegistryValue Type="string" Name="URL Protocol" Value="" />
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)\DefaultIcon" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Root="HKLM" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)\DefaultIcon" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="[INSTALLDIR]$(var.AppExe)" />
</RegistryKey>
<RegistryKey Root="HKCU" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)\shell\open\command" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Root="HKLM" Key="Software\Classes\$(var.AppCommandOpenUrlScheme)\shell\open\command" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Value="&quot;[INSTALLDIR]$(var.AppExe)&quot; &quot;%1&quot;" />
</RegistryKey>
</Component>
Expand All @@ -232,7 +213,6 @@
<ComponentGroupRef Id="ClientFiles" />

<ComponentRef Id="RegistryVersionInfo" />
<ComponentRef Id="RegistryMiscInfo" />
<ComponentRef Id="RegistryDefaultSettings" />
<ComponentRef Id="RegistryUriHandler" />

Expand Down
4 changes: 0 additions & 4 deletions admin/win/msi/OEM.wxi.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@

<?define AppCommandOpenUrlScheme = "@APPLICATION_URI_HANDLER_SCHEME@" ?>

<?define CfApiShellextWndClassName = "@CFAPI_SHELLEXT_WINDOW_CLASS_NAME@" ?>
<?define NCOverlaysShellextWndClassName = "@NCOVERLAYS_SHELLEXT_WINDOW_CLASS_NAME@" ?>
<?define NCContextMenuShellextWndClassName = "@NCCONTEXTMENU_SHELLEXT_WINDOW_CLASS_NAME@" ?>

<!-- Custom license: To use it, also remove the "Skip the license page" stuff in the <UI> section
and uncomment <WixVariable Id="WixUILicenseRtf"...
<?define AppLicenseRtf = "path\License.rtf" ?>
Expand Down
67 changes: 0 additions & 67 deletions admin/win/tools/NCMsiHelper/CustomAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*/

#include "NCMsiHelper.h"
#include <MsiQuery.h>
#include <vector>

/**
* Sets up logging for MSIs and then calls the appropriate custom action with argc/argv parameters.
Expand Down Expand Up @@ -96,71 +94,6 @@ UINT __stdcall RemoveNavigationPaneEntries(MSIHANDLE hInstall)
return CustomActionArgcArgv(hInstall, DoRemoveNavigationPaneEntries, "RemoveNavigationPaneEntries");
}

UINT LogMsiInfoMessage(MSIHANDLE hInstall, const TCHAR *format, ...)
{
TCHAR szFormatted[MAX_PATH];

va_list args;
va_start(args, format);
vswprintf(szFormatted, MAX_PATH, format, args);
va_end(args);

PMSIHANDLE hRecord = ::MsiCreateRecord(1);
::MsiRecordSetString(hRecord, 0, szFormatted);

// we are always logging a message as info, as error will bring a popup that we don't want, just logs
return MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRecord);
}

UINT __stdcall CloseWindowByClassName(MSIHANDLE hInstall)
{
const auto windowClassPropertyName = _T("WNDCLASSNAMETOCLOSE");
DWORD windowClassNameSize = 0;
if (MsiGetProperty(hInstall, windowClassPropertyName, _T(""), &windowClassNameSize) != ERROR_MORE_DATA) {
LogMsiInfoMessage(hInstall,
_T("ERROR: Custom action CloseWindowByClassName. MsiGetProperty failed for windowClassPropertyName: %s"),
windowClassPropertyName);
return ERROR_BAD_ARGUMENTS;
}

if (windowClassNameSize <= 0) {
LogMsiInfoMessage(hInstall, _T("ERROR: Custom action CloseWindowByClassName. classNameSize is <= 0!"));
return ERROR_BAD_ARGUMENTS;
}

++windowClassNameSize;

std::vector<TCHAR> windowClassNameValue(windowClassNameSize, 0);
std::vector<char> vec;
const auto getPropertyRes = MsiGetProperty(hInstall, windowClassPropertyName, windowClassNameValue.data(), &windowClassNameSize);
if (getPropertyRes != ERROR_SUCCESS) {
LogMsiInfoMessage(hInstall, _T("ERROR: Custom action CloseWindowByClassName. MsiGetProperty failed for windowClassPropertyName: %s with code: %d"),
windowClassNameValue.data(),
getPropertyRes);
return getPropertyRes;
}

if (windowClassNameSize <= 0) {
LogMsiInfoMessage(hInstall, _T("ERROR: Custom action CloseWindowByClassName. Final classNameSize is <= 0!"));
return ERROR_BAD_ARGUMENTS;
}

LogMsiInfoMessage(hInstall, _T("Custom action CloseWindowByClassName is running for windowClassNameValue: %s"), windowClassNameValue.data());

const auto windowToCloseHandle = FindWindow(windowClassNameValue.data(), NULL);
if (windowToCloseHandle == NULL) {
LogMsiInfoMessage(hInstall, _T("WARNING: Custom action CloseWindowByClassName. windowToCloseHandle is NULL."));
// FindWindow will return NULL if the window is not currently running, so not an error
return ERROR_SUCCESS;
}

LogMsiInfoMessage(hInstall, _T("Custom action CloseWindowByClassName. Sending WM_CLOSE message to windowClassNameValue: %s"), windowClassNameValue.data());

SendMessage(windowToCloseHandle, WM_CLOSE, 0, 0);

return ERROR_SUCCESS;
}

/**
* DllMain - Initialize and cleanup WiX custom action utils.
*/
Expand Down
1 change: 0 additions & 1 deletion admin/win/tools/NCMsiHelper/CustomAction.def
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
EXPORTS
CloseWindowByClassName
ExecNsisUninstaller
RemoveNavigationPaneEntries
19 changes: 0 additions & 19 deletions admin/win/tools/NCMsiHelper/NCMsiHelper.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,5 @@
Execute="deferred"
Impersonate="yes" />

<CustomAction Id="CloseCfApiShellExtension"
Return="ignore"
BinaryKey="NCMsiHelper"
DllEntry="CloseWindowByClassName"
Execute="immediate"
Impersonate="yes" />
<CustomAction Id="CloseNCContextMenuShellExtension"
Return="ignore"
BinaryKey="NCMsiHelper"
DllEntry="CloseWindowByClassName"
Execute="immediate"
Impersonate="yes" />
<CustomAction Id="CloseNCOverlaysShellExtension"
Return="ignore"
BinaryKey="NCMsiHelper"
DllEntry="CloseWindowByClassName"
Execute="immediate"
Impersonate="yes" />

</Fragment>
</Wix>
4 changes: 0 additions & 4 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@

#cmakedefine BUILD_UPDATER "@BUILD_UPDATER@"

#cmakedefine CFAPI_SHELLEXT_WINDOW_CLASS_NAME "@CFAPI_SHELLEXT_WINDOW_CLASS_NAME@"
#cmakedefine NCCONTEXTMENU_SHELLEXT_WINDOW_CLASS_NAME "@NCCONTEXTMENU_SHELLEXT_WINDOW_CLASS_NAME@"
#cmakedefine NCOVERLAYS_SHELLEXT_WINDOW_CLASS_NAME "@NCOVERLAYS_SHELLEXT_WINDOW_CLASS_NAME@"

#cmakedefine CFAPI_SHELLEXT_APPID_REG "@CFAPI_SHELLEXT_APPID_REG@"
#cmakedefine CFAPI_SHELLEXT_APPID_DISPLAY_NAME "@CFAPI_SHELLEXT_APPID_DISPLAY_NAME@"

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# The short X.Y version.
version = '3.12'
# The full version, including alpha/beta/rc tags.
release = '3.12.2'
release = '3.12.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Binary file added nmctheme_v1.rcc
Binary file not shown.
66 changes: 0 additions & 66 deletions shell_integration/windows/NCContextMenu/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
HINSTANCE g_hInst = nullptr;
long g_cDllRef = 0;

HWND hHiddenWnd = nullptr;
DWORD WINAPI MessageLoopThread(LPVOID lpParameter);
LRESULT CALLBACK HiddenWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void CreateHiddenWindowAndLaunchMessageLoop();

BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
Expand All @@ -35,7 +30,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
// path of the DLL to register the component.
g_hInst = hModule;
DisableThreadLibraryCalls(hModule);
CreateHiddenWindowAndLaunchMessageLoop();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
Expand Down Expand Up @@ -128,63 +122,3 @@ STDAPI DllUnregisterServer(void)

return hr;
}

void CreateHiddenWindowAndLaunchMessageLoop()
{
const WNDCLASSEX hiddenWindowClass{sizeof(WNDCLASSEX),
CS_CLASSDC,
HiddenWndProc,
0L,
0L,
GetModuleHandle(NULL),
NULL,
NULL,
NULL,
NULL,
NCCONTEXTMENU_SHELLEXT_WINDOW_CLASS_NAME,
NULL};

RegisterClassEx(&hiddenWindowClass);

hHiddenWnd = CreateWindow(hiddenWindowClass.lpszClassName,
L"",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hiddenWindowClass.hInstance,
NULL);

ShowWindow(hHiddenWnd, SW_HIDE);
UpdateWindow(hHiddenWnd);

const auto hMessageLoopThread = CreateThread(NULL, 0, MessageLoopThread, NULL, 0, NULL);
if (hMessageLoopThread) {
CloseHandle(hMessageLoopThread);
}
}

DWORD WINAPI MessageLoopThread(LPVOID lpParameter)
{
MSG msg;
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}

LRESULT CALLBACK HiddenWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_CLOSE:
FreeLibrary(g_hInst);
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}
Loading
Loading