a few small things, ZERO errors when compiling, feeling gangster about it, here it is

This commit is contained in:
freedom
2023-07-19 13:05:43 -06:00
parent d2c8b2ba53
commit 2b21acce36
9 changed files with 159 additions and 31 deletions

59
progmgr/shellint.c Normal file
View File

@@ -0,0 +1,59 @@
/* * * * * * * *\
SHELLINT.C -
Copyright (c) 2023 freedom7341, Freedom Desktop
DESCRIPTION -
Program Manager's shell interface functions.
LICENSE INFORMATION -
MIT License, see LICENSE.txt in the root folder
\* * * * * * * */
/* Headers */
#include "progmgr.h"
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
/* Functions */
/* * * *\
RunFile -
Produces a Run dialog window.
RETURNS -
True if successful, false if unsuccessful.
\* * * */
BOOL RunFile(HWND hWndOwner,
HICON hIcon,
LPWSTR lpszDir,
LPWSTR lpszTitle,
LPWSTR lpszDesc,
DWORD dwFlags)
{
HMODULE hLib = LoadLibrary(L"shell32.dll");
if (hLib) {
FARPROC fLib = GetProcAddress(hLib, MAKEINTRESOURCEA(61));
if (fLib(hWndOwner, hIcon, lpszDir, lpszTitle, lpszDesc, dwFlags))
FreeLibrary(hLib);
return TRUE;
}
return 0;
}
/* * * *\
ShutdownDlg -
Produces a Shutdown dialog window.
RETURNS -
True if successful, false if unsuccessful.
\* * * */
BOOL ShutdownDlg(HWND hWndOwner)
{
HMODULE hLib = LoadLibrary(L"shell32.dll");
if (hLib) {
FARPROC fLib = GetProcAddress(hLib, MAKEINTRESOURCEA(60));
if (fLib(hWndOwner))
FreeLibrary(hLib);
return TRUE;
}
return 0;
}