4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle
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.
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.
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
22 #define WIN32_LEAN_AND_MEAN
29 CHAR STRING_MAIN_WIN_CLASS_NAME
[] = "PMMain";
30 CHAR STRING_MDI_WIN_CLASS_NAME
[] = "MDICLIENT";
31 CHAR STRING_GROUP_WIN_CLASS_NAME
[] = "PMGroup";
32 CHAR STRING_PROGRAM_WIN_CLASS_NAME
[] = "PMProgram";
35 CHAR STRING_ACCEL
[] = "ACCEL";
36 CHAR STRING_MENU
[] = "MENU";
37 CHAR STRING_NEW
[] = "DIALOG_NEW";
38 CHAR STRING_OPEN
[] = "DIALOG_OPEN";
39 CHAR STRING_MOVE
[] = "DIALOG_MOVE";
40 CHAR STRING_COPY
[] = "DIALOG_COPY";
41 CHAR STRING_DELETE
[] = "DIALOG_DELETE";
42 CHAR STRING_GROUP
[] = "DIALOG_GROUP";
43 CHAR STRING_PROGRAM
[] = "DIALOG_PROGRAM";
44 CHAR STRING_SYMBOL
[] = "DIALOG_SYMBOL";
45 CHAR STRING_EXECUTE
[] = "DIALOG_EXECUTE";
48 VOID
STRING_LoadMenus(VOID
)
50 CHAR caption
[MAX_STRING_LEN
];
53 /* Set frame caption */
54 LoadString(Globals
.hInstance
, IDS_PROGRAM_MANAGER
, caption
, sizeof(caption
));
55 SetWindowText(Globals
.hMainWnd
, caption
);
58 hMainMenu
= LoadMenu(Globals
.hInstance
, MAKEINTRESOURCE(MAIN_MENU
));
59 Globals
.hFileMenu
= GetSubMenu(hMainMenu
, 0);
60 Globals
.hOptionMenu
= GetSubMenu(hMainMenu
, 1);
61 Globals
.hWindowsMenu
= GetSubMenu(hMainMenu
, 2);
62 Globals
.hLanguageMenu
= GetSubMenu(hMainMenu
, 3);
65 SendMessage(Globals
.hMDIWnd
, WM_MDISETMENU
,
67 (LPARAM
) Globals
.hWindowsMenu
);
68 else SetMenu(Globals
.hMainWnd
, hMainMenu
);
70 /* Destroy old menu */
71 if (Globals
.hMainMenu
) DestroyMenu(Globals
.hMainMenu
);
72 Globals
.hMainMenu
= hMainMenu
;
75 /* Local Variables: */
76 /* c-file-style: "GNU" */