1144
1183
gui->diskmenu = CreatePopupMenu();
1145
1184
gui->menu=CreatePopupMenu();
1146
1185
gui->trayplaymenu = CreatePopupMenu();
1147
AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open...");
1148
AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, "File...");
1149
AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, "Url...");
1150
AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, "Directory...");
1151
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1152
AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT) gui->diskmenu, "Play &CD/DVD/VCD/SVCD");
1153
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1154
AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle");
1155
AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, "Skin Browser");
1156
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1157
AppendMenu(gui->menu, MF_STRING, ID_PREFS, "Preferences");
1158
AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, "Debug Console");
1159
AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, "Online Help");
1160
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1161
AppendMenu(gui->menu, MF_STRING, IDEXIT, "&Exit");
1186
AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
1187
AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, acp(MSGTR_MENU_PlayFile));
1188
AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, acp(MSGTR_MENU_PlayURL));
1189
AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, acp(MSGTR_MENU_PlayDirectory));
1190
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1191
AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->diskmenu, acp(MSGTR_MENU_PlayDisc));
1192
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1193
AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle));
1194
AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, acp(MSGTR_MENU_SkinBrowser));
1195
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1196
AppendMenu(gui->menu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences));
1197
AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole));
1198
AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp));
1199
AppendMenu(gui->menu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer));
1200
AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
1201
AppendMenu(gui->menu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
1164
1204
static void create_traymenu(gui_t *gui)
1166
1206
gui->traymenu = CreatePopupMenu();
1167
1207
gui->trayplaybackmenu = CreatePopupMenu();
1168
AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open...");
1169
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1170
AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaybackmenu, "Playback");
1171
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, "Seek Backwards");
1172
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, "Previous Track");
1173
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, "Play/Pause");
1174
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, "Stop");
1175
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, "Next Track");
1176
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, "Seek Forwards");
1177
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1178
AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, "Toggle Mute");
1179
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1180
AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle");
1181
AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, "Playlist");
1182
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1183
AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, "Show/Hide");
1184
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1185
AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, "Preferences");
1186
AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, "Debug Console");
1187
AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, "Online Help");
1188
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1189
AppendMenu(gui->traymenu, MF_STRING, IDEXIT, "&Exit");
1208
AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
1209
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1210
AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaybackmenu, acp(MSGTR_MENU_Playing));
1211
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
1212
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
1213
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
1214
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
1215
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
1216
AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
1217
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1218
AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
1219
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1220
AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle));
1221
AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, acp(MSGTR_MENU_PlayList));
1222
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1223
AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, acp(MSGTR_MENU_ShowHide));
1224
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1225
AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences));
1226
AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole));
1227
AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp));
1228
AppendMenu(gui->traymenu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer));
1229
AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
1230
AppendMenu(gui->traymenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
1192
1233
static void create_submenu(gui_t *gui)
1195
1236
gui->dvdmenu = CreatePopupMenu();
1196
1237
gui->aspectmenu = CreatePopupMenu();
1197
1238
gui->subtitlemenu = CreatePopupMenu();
1198
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->trayplaymenu, "Open...");
1199
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1200
AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, "Seek Backwards");
1201
AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, "Previous Track");
1202
AppendMenu(gui->submenu, MF_STRING, ID_PLAY, "Play/Pause");
1203
AppendMenu(gui->submenu, MF_STRING, ID_STOP, "Stop");
1204
AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, "Next Track");
1205
AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, "Seek Forwards");
1206
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1207
AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, "Toggle Fullscreen");
1208
AppendMenu(gui->submenu, MF_STRING, ID_MUTE, "Toggle Mute");
1209
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1210
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->aspectmenu, "Aspect Ratio");
1211
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->subtitlemenu, "Subtitle Options");
1212
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->dvdmenu, "DVD Options");
1239
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
1240
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1241
AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
1242
AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
1243
AppendMenu(gui->submenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
1244
AppendMenu(gui->submenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
1245
AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
1246
AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
1247
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1248
AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, acp(MSGTR_MENU_FullScreen));
1249
AppendMenu(gui->submenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
1250
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1251
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio));
1252
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles));
1253
AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD));
1213
1254
#ifdef CONFIG_DVDREAD
1214
AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, "Select Title/Chapter...");
1255
AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, acp(MSGTR_SelectTitleChapter));
1216
AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, "Subtitle Visibility On/Off");
1217
AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, "Cycle Subtitle Languages");
1218
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "Set 16:9");
1219
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "Set 4:3");
1220
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "Set 2.35");
1257
AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, acp(MSGTR_MENU_SubtitlesOnOff));
1258
AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, acp(MSGTR_MENU_SubtitleLanguages));
1259
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "16:9");
1260
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "4:3");
1261
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "2.35");
1221
1262
AppendMenu(gui->aspectmenu, MF_SEPARATOR, 0, 0);
1222
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, "Original Aspect");
1263
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, acp(MSGTR_MENU_Original));
1223
1264
AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
1224
AppendMenu(gui->submenu, MF_STRING, IDEXIT, "&Exit");
1265
AppendMenu(gui->submenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
1227
1268
static void maketransparent(HWND hwnd, COLORREF crTransparent)
1229
1270
HDC mdc = GetDC(hwnd);
1231
1272
HRGN crRgnres, crRgn, crRgnTmp;
1232
1273
int iX = 0, iY = 0, iLeftX = 0;
1233
1275
int width, height;
1234
GetWindowRect(hwnd, &rd);
1235
width = rd.right - rd.left;
1236
height = rd.bottom - rd.top;
1238
/* create an empty region */
1239
crRgn = CreateRectRgn(0, 0, 0, 0);
1277
GetWindowRect(hwnd, &wrd);
1278
GetClientRect(hwnd, &crd);
1280
border = (wrd.right - wrd.left - crd.right) / 2;
1281
title = (wrd.bottom - wrd.top - crd.bottom) - border;
1283
width = crd.right - crd.left;
1284
height = crd.bottom - crd.top;
1286
/* create the title bar region */
1287
crRgn = CreateRectRgn(0, 0, width + border + border, title);
1241
1289
/* Create a region from a bitmap with transparency colour of Purple */
1242
1290
for (iY = -1; iY < height; iY++)