6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 void TaskManager_OnFileNew(void)
30 RUNFILEDLG RunFileDlg
;
31 OSVERSIONINFO versionInfo
;
34 char szTitle
[40] = "Create New Task";
35 char szText
[256] = "Type the name of a program, folder, document, or Internet resource, and Task Manager will open it for you.";
37 hShell32
= LoadLibrary("SHELL32.DLL");
38 RunFileDlg
= (RUNFILEDLG
)(FARPROC
)GetProcAddress(hShell32
, (char*)((long)0x3D));
40 // Show "Run..." dialog
43 versionInfo
.dwOSVersionInfoSize
= sizeof(OSVERSIONINFO
);
44 GetVersionEx(&versionInfo
);
46 if (versionInfo
.dwPlatformId
== VER_PLATFORM_WIN32_NT
)
48 MultiByteToWideChar(CP_ACP
, MB_PRECOMPOSED
, szTitle
, -1, wTitle
, 40);
49 MultiByteToWideChar(CP_ACP
, MB_PRECOMPOSED
, szText
, -1, wText
, 256);
50 RunFileDlg(hMainWnd
, 0, NULL
, (LPCSTR
)wTitle
, (LPCSTR
)wText
, RFF_CALCDIRECTORY
);
53 RunFileDlg(hMainWnd
, 0, NULL
, szTitle
, szText
, RFF_CALCDIRECTORY
);
56 FreeLibrary(hShell32
);