2004-01-10 02:14:13 +00:00
|
|
|
/*
|
|
|
|
* ReactOS Task Manager
|
|
|
|
*
|
|
|
|
* run.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
|
2005-03-27 20:01:18 +00:00
|
|
|
* 2005 Klemens Friedl <frik85@reactos.at>
|
2004-01-10 02:14:13 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2009-10-27 10:34:16 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
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 */
|
2007-11-09 15:26:02 +00:00
|
|
|
LoadStringW(hInst, IDS_CREATENEWTASK, szTitle, sizeof(szTitle) / sizeof(szTitle[0]));
|
|
|
|
LoadStringW(hInst, IDS_CREATENEWTASK_DESC, szText, sizeof(szText) / sizeof(szText[0]));
|
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);
|
|
|
|
}
|