[DCOMLAUNCH] Add a DcomLaunch service stub
[reactos.git] / base / shell / progman / string.c
1 /*
2 * Program Manager
3 *
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22 /*
23 * PROJECT: ReactOS Program Manager
24 * COPYRIGHT: GPL - See COPYING in the top level directory
25 * FILE: base/shell/progman/string.c
26 * PURPOSE: String utility functions
27 * PROGRAMMERS: Ulrich Schmid
28 * Sylvain Petreolle
29 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
30 */
31
32 #include "progman.h"
33
34 WCHAR szTitle[256]; // MAX_STRING_LEN ?
35
36 VOID STRING_LoadStrings(VOID)
37 {
38 LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, szTitle, ARRAYSIZE(szTitle));
39 }
40
41 VOID STRING_LoadMenus(VOID)
42 {
43 HMENU hMainMenu;
44
45 /* Create the menu */
46 hMainMenu = LoadMenuW(Globals.hInstance, MAKEINTRESOURCEW(MAIN_MENU));
47 Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
48 Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
49 Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
50 Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
51
52 if (Globals.hMDIWnd)
53 SendMessageW(Globals.hMDIWnd, WM_MDISETMENU, (WPARAM)hMainMenu, (LPARAM)Globals.hWindowsMenu);
54 else
55 SetMenu(Globals.hMainWnd, hMainMenu);
56
57 /* Destroy the old menu */
58 if (Globals.hMainMenu)
59 DestroyMenu(Globals.hMainMenu);
60 Globals.hMainMenu = hMainMenu;
61 }