2004-01-10 02:14:13 +00:00
|
|
|
/*
|
2021-12-16 01:25:32 +00:00
|
|
|
* PROJECT: ReactOS Task Manager
|
2023-06-15 17:45:15 +00:00
|
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
2023-10-03 19:00:10 +00:00
|
|
|
* PURPOSE: Run Task
|
2021-12-16 01:25:32 +00:00
|
|
|
* COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org>
|
|
|
|
* Copyright 2005 Klemens Friedl <frik85@reactos.at>
|
2004-01-10 02:14:13 +00:00
|
|
|
*/
|
2005-05-08 04:07:56 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
void TaskManager_OnFileNew(void)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
HMODULE hShell32;
|
|
|
|
RUNFILEDLG RunFileDlg;
|
|
|
|
WCHAR szTitle[40];
|
|
|
|
WCHAR szText[256];
|
2005-03-27 20:01:18 +00:00
|
|
|
|
2005-05-04 19:29:28 +00:00
|
|
|
/* Load language strings from resource file */
|
2023-10-03 19:00:10 +00:00
|
|
|
LoadStringW(hInst, IDS_CREATENEWTASK, szTitle, _countof(szTitle));
|
|
|
|
LoadStringW(hInst, IDS_CREATENEWTASK_DESC, szText, _countof(szText));
|
2005-03-27 20:01:18 +00:00
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
hShell32 = LoadLibraryW(L"SHELL32.DLL");
|
2015-12-27 19:06:16 +00:00
|
|
|
RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (LPCSTR)61);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Show "Run..." dialog */
|
|
|
|
if (RunFileDlg)
|
|
|
|
{
|
2015-12-27 19:06:16 +00:00
|
|
|
HICON hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_TASKMANAGER));
|
|
|
|
|
2005-05-04 19:29:28 +00:00
|
|
|
/* NOTE - don't check whether running on win 9x or NT, let's just
|
|
|
|
assume that a unicode build only runs on NT */
|
2016-05-18 08:30:45 +00:00
|
|
|
RunFileDlg(hMainWnd, hIcon, NULL, szTitle, szText, RFF_CALCDIRECTORY);
|
2015-12-27 19:06:16 +00:00
|
|
|
|
|
|
|
DeleteObject(hIcon);
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FreeLibrary(hShell32);
|
|
|
|
}
|