6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
7 * 2005 Klemens Friedl <frik85@reactos.at>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 void TaskManager_OnFileNew(void)
29 RUNFILEDLG RunFileDlg
;
33 /* Load language strings from resource file */
34 LoadString(hInst
, IDS_CREATENEWTASK
, szTitle
, sizeof(szTitle
) / sizeof(szTitle
[0]));
35 LoadString(hInst
, IDS_CREATENEWTASK_DESC
, szText
, sizeof(szText
) / sizeof(szText
[0]));
38 hShell32
= LoadLibrary(_T("SHELL32.DLL"));
39 RunFileDlg
= (RUNFILEDLG
)(FARPROC
)GetProcAddress(hShell32
, (LPCSTR
)0x3D);
41 /* Show "Run..." dialog */
45 if (GetVersion() < 0x80000000)
50 /* RunFileDlg is always unicode on NT systems, convert the ansi
52 MultiByteToWideChar(CP_ACP
, MB_PRECOMPOSED
, szTitle
, -1, wTitle
, sizeof(szTitle
) / sizeof(szTitle
[0]));
53 MultiByteToWideChar(CP_ACP
, MB_PRECOMPOSED
, szText
, -1, wText
, sizeof(szText
) / sizeof(szText
[0]));
55 RunFileDlg(hMainWnd
, 0, NULL
, wTitle
, wText
, RFF_CALCDIRECTORY
);
59 /* RunFileDlg is ansi on win 9x systems */
60 RunFileDlg(hMainWnd
, 0, NULL
, (LPCWSTR
)szTitle
, (LPCWSTR
)szText
, RFF_CALCDIRECTORY
);
63 /* NOTE - don't check whether running on win 9x or NT, let's just
64 assume that a unicode build only runs on NT */
65 RunFileDlg(hMainWnd
, 0, NULL
, szTitle
, szText
, RFF_CALCDIRECTORY
);
69 FreeLibrary(hShell32
);