blob: 97603881e6036ad2ea9bb45cf9b7118dc8d28ac0 [file] [log] [blame]
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001/*
2 * Program Manager
3 *
4 * Copyright 1996 Ulrich Schmid
Sylvain Petreolle4eeadac2002-10-23 20:15:48 +00005 * Copyright 2002 Sylvain Petreolle
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00006 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000020 */
21
Mike McCormack7d665672006-01-16 20:41:34 +010022#define WIN32_LEAN_AND_MEAN
23
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000024#include "windows.h"
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000025#include "progman.h"
26
27/* Class names */
28
29CHAR STRING_MAIN_WIN_CLASS_NAME[] = "PMMain";
30CHAR STRING_MDI_WIN_CLASS_NAME[] = "MDICLIENT";
31CHAR STRING_GROUP_WIN_CLASS_NAME[] = "PMGroup";
32CHAR STRING_PROGRAM_WIN_CLASS_NAME[] = "PMProgram";
33
34/* Resource names */
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000035CHAR STRING_ACCEL[] = "ACCEL";
Sylvain Petreolle4eeadac2002-10-23 20:15:48 +000036CHAR STRING_MENU[] = "MENU";
37CHAR STRING_NEW[] = "DIALOG_NEW";
38CHAR STRING_OPEN[] = "DIALOG_OPEN";
39CHAR STRING_MOVE[] = "DIALOG_MOVE";
40CHAR STRING_COPY[] = "DIALOG_COPY";
41CHAR STRING_DELETE[] = "DIALOG_DELETE";
42CHAR STRING_GROUP[] = "DIALOG_GROUP";
43CHAR STRING_PROGRAM[] = "DIALOG_PROGRAM";
44CHAR STRING_SYMBOL[] = "DIALOG_SYMBOL";
45CHAR STRING_EXECUTE[] = "DIALOG_EXECUTE";
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000046
Sylvain Petreolle4eeadac2002-10-23 20:15:48 +000047
48VOID STRING_LoadMenus(VOID)
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000049{
Alexandre Julliardc981d0b1996-03-31 16:40:13 +000050 CHAR caption[MAX_STRING_LEN];
Alexandre Julliard59730ae1996-03-24 16:20:51 +000051 HMENU hMainMenu;
Alexandre Julliard59730ae1996-03-24 16:20:51 +000052
Alexandre Julliardc981d0b1996-03-31 16:40:13 +000053 /* Set frame caption */
54 LoadString(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
55 SetWindowText(Globals.hMainWnd, caption);
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000056
Alexandre Julliard59730ae1996-03-24 16:20:51 +000057 /* Create menu */
Sylvain Petreolle4eeadac2002-10-23 20:15:48 +000058 hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
Alexandre Julliardc981d0b1996-03-31 16:40:13 +000059 Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
60 Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
61 Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
62 Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000063
Alexandre Julliardc981d0b1996-03-31 16:40:13 +000064 if (Globals.hMDIWnd)
65 SendMessage(Globals.hMDIWnd, WM_MDISETMENU,
66 (WPARAM) hMainMenu,
67 (LPARAM) Globals.hWindowsMenu);
68 else SetMenu(Globals.hMainWnd, hMainMenu);
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000069
Alexandre Julliardc981d0b1996-03-31 16:40:13 +000070 /* Destroy old menu */
71 if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
72 Globals.hMainMenu = hMainMenu;
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000073}
74
75/* Local Variables: */
76/* c-file-style: "GNU" */
77/* End: */