6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library 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 GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 typedef void (WINAPI
*RUNFILEDLG
)(
34 LPCSTR lpstrDirectory
,
36 LPCSTR lpstrDescription
,
40 * Flags for RunFileDlg
43 #define RFF_NOBROWSE 0x01 /* Removes the browse button. */
44 #define RFF_NODEFAULT 0x02 /* No default item selected. */
45 #define RFF_CALCDIRECTORY 0x04 /* Calculates the working directory from the file name. */
46 #define RFF_NOLABEL 0x08 /* Removes the edit box label. */
47 #define RFF_NOSEPARATEMEM 0x20 /* Removes the Separate Memory Space check box (Windows NT only). */
49 void TaskManager_OnFileNew(void)
51 RUNFILEDLG RunFileDlg
;
52 OSVERSIONINFOW versionInfo
;
54 RunFileDlg
= (void *)GetProcAddress(GetModuleHandleW(L
"shell32.dll"), (LPCSTR
)61);
56 /* Show "Run..." dialog */
59 HICON hIcon
= LoadIconW(GetModuleHandleW(NULL
), MAKEINTRESOURCEW(IDI_TASKMANAGER
));
60 versionInfo
.dwOSVersionInfoSize
= sizeof(OSVERSIONINFOW
);
61 GetVersionExW(&versionInfo
);
63 if (versionInfo
.dwPlatformId
== VER_PLATFORM_WIN32_NT
)
66 LoadStringW(GetModuleHandleW(NULL
), IDS_RUNDLG_CAPTION
, wTitle
, 64);
67 RunFileDlg(hMainWnd
, hIcon
, NULL
, (LPCSTR
)wTitle
, NULL
, RFF_CALCDIRECTORY
);
72 LoadStringA(GetModuleHandleW(NULL
), IDS_RUNDLG_CAPTION
, szTitle
, 64);
73 RunFileDlg(hMainWnd
, hIcon
, NULL
, szTitle
, NULL
, RFF_CALCDIRECTORY
);