annotate gui/win32/preferences.c @ 34168:55abe5125482

Make include recursion depth actually have some effect. Not working yet though, needs another change to really work properly.
author reimar
date Tue, 25 Oct 2011 19:22:10 +0000
parents d57ed389b6e2
children 9082a0976655
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1 /*
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
2 * MPlayer GUI for Win32
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
3 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
4 * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
5 * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
6 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
7 * This file is part of MPlayer.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
8 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
9 * MPlayer is free software; you can redistribute it and/or modify
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
10 * it under the terms of the GNU General Public License as published by
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
12 * (at your option) any later version.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
13 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
14 * MPlayer is distributed in the hope that it will be useful,
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
17 * GNU General Public License for more details.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
18 *
26457
9ba6d4487292 Use standard GPL header.
diego
parents: 26372
diff changeset
19 * You should have received a copy of the GNU General Public License along
9ba6d4487292 Use standard GPL header.
diego
parents: 26372
diff changeset
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
9ba6d4487292 Use standard GPL header.
diego
parents: 26372
diff changeset
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
22 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 #include <windows.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 #include <commctrl.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26 #include <stdio.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #include <stdlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #include <string.h>
23091
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
29
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
30 #include "libvo/video_out.h"
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
31 #include "libao2/audio_out.h"
32068
ab6ac5b156ca Replace proc_priority extern declaration by osdep/priority.h #include.
diego
parents: 30558
diff changeset
32 #include "osdep/priority.h"
23091
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
33 #include "mixer.h"
33761
16286ee1fc71 Fix Win32 GUI compilation problems.
ib
parents: 33731
diff changeset
34 #include "gui/util/list.h"
33557
71ec25d1da10 Fix compilation after r33644.
ib
parents: 33555
diff changeset
35 #include "gui/ui/gmplayer.h"
26372
76413880bfad Update include paths to account for build system changes.
diego
parents: 26193
diff changeset
36 #include "gui/interface.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 #include "gui.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 #include "mp_msg.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 #include "help_mp.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #include "dialogs.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41
33619
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
42
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
43 static void set_defaults(void)
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
44 {
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
45 proc_priority = "normal";
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
46 vo_doublebuffering = 1;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
47 vo_directrendering = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
48 frame_dropping = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
49 soft_vol = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
50 gtkAONorm = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
51 gtkAOExtraStereo = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
52 gtkAOExtraStereoMul = 1.0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
53 audio_delay = 0.0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
54 sub_window = 1;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
55 gtkCacheOn = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
56 gtkCacheSize = 2048;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
57 gtkAutoSyncOn = 0;
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
58 gtkAutoSync = 0;
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
59 player_idle_mode = 1;
33619
35a12ef532de win32 gui: Move static function around to avoid a forward declaration.
diego
parents: 33614
diff changeset
60 }
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 static HWND vo_driver, ao_driver, prio;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 int i = 0, j = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 char dvddevice[MAX_PATH];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 char cdromdevice[MAX_PATH];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 char procprio[11];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 float x = 10.0, y = 100.0, stereopos, delaypos;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 stereopos = gtkAOExtraStereoMul * x;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 delaypos = audio_delay * y;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 switch (iMsg)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 case WM_CREATE:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 /* video and audio drivers */
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
79 label = CreateWindow("static", acp(MSGTR_PREFERENCES_Video),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
80 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
81 10, 14, 60, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
86 label = CreateWindow("static", acp(MSGTR_PREFERENCES_Audio),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
87 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
88 205, 14, 60, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
93 label = CreateWindow("static", acp(MSGTR_PREFERENCES_Coefficient),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
94 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
95 10, 148, 140, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
100 label = CreateWindow("static", acp(MSGTR_PREFERENCES_AudioDelay),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
101 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
102 10, 187, 140, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
107 label = CreateWindow("static", acp(MSGTR_PREFERENCES_FRAME_OSD_Level),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 WS_CHILD | WS_VISIBLE,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
109 10, 286, 115, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
114 label = CreateWindow("static", acp(MSGTR_PREFERENCES_DVDDevice),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
115 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
116 55, 387, 100, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
121 label = CreateWindow("static", acp(MSGTR_PREFERENCES_CDROMDevice),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
122 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
123 185, 387, 100, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
128 label = CreateWindow("static", acp(MSGTR_PREFERENCES_Priority),
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
129 WS_CHILD | WS_VISIBLE | SS_RIGHT,
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
130 200, 286, 100, 15, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 vo_driver = CreateWindow("combobox", NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 WS_VSCROLL | WS_TABSTOP,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 80, 10, 100, 160, hwnd,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 (HMENU) ID_VO_DRIVER,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 ao_driver = CreateWindow("combobox", NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 WS_VSCROLL | WS_TABSTOP,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
150 275, 10, 100, 160, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 (HMENU) ID_AO_DRIVER,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 prio = CreateWindow("combobox", NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 CBS_DROPDOWNLIST | CB_SHOWDROPDOWN |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 WS_VSCROLL | WS_TABSTOP,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
160 310, 282, 100, 160, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 (HMENU) ID_PRIO,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 /* checkboxes */
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
166 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DoubleBuffer),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
168 10, 35, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 hwnd, (HMENU) ID_DOUBLE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
174 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DirectRender),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
176 10, 57, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 hwnd, (HMENU) ID_DIRECT,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
182 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_FrameDrop),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
184 10, 79, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 hwnd, (HMENU) ID_FRAMEDROP,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
190 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NoIdle),
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
191 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
192 10, 101, 225, 25,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
193 hwnd, (HMENU) ID_IDLE,
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
194 ((LPCREATESTRUCT) lParam) -> hInstance,
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
195 NULL);
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
196 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
197
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
198 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NormalizeSound),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
200 220, 35, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 hwnd, (HMENU) ID_NORMALIZE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
206 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_SoftwareMixer),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
208 220, 57, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 hwnd, (HMENU) ID_SOFTMIX,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
214 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_ExtraStereo),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
216 220, 79, 160, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217 hwnd, (HMENU) ID_EXTRASTEREO,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
222 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_Cache),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
224 10, 222, 90, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
225 hwnd, (HMENU) ID_CACHE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
226 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
227 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
228 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
229
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
230 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_AutoSync),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
231 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
232 240, 222, 110, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
233 (HMENU) ID_AUTOSYNC,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
234 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
235 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
236 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
237
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
238 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_VideoInSubwin),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
239 WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
240 10, 249, 250, 25,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
241 hwnd, (HMENU) ID_SUBWINDOW,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
242 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
243 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
244 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
245
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
246 /* osd level */
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
247 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL0),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
248 WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
249 15, 297, 200, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
250 (HMENU) ID_NONE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
251 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
252 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
253 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
254
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
255 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL1),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
256 WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
257 15, 317, 395, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
258 (HMENU) ID_OSD1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
259 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
260 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
261 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
262
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
263 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL2),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
264 WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
265 15, 337, 395, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
266 (HMENU) ID_OSD2,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
267 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
268 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
269 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
270
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
271 btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL3),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
272 WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
273 15, 357, 395, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
274 (HMENU) ID_OSD3,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
275 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
276 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
277 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
278
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
279 btn = CreateWindow("button", acp(MSGTR_Ok),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
280 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
281 248, 417, 80, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
282 (HMENU) ID_APPLY,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
283 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
284 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
285 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
286
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
287 btn = CreateWindow("button", acp(MSGTR_Cancel),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
288 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
289 334, 417, 80, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
290 (HMENU) ID_CANCEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
291 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
292 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
293 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
294
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
295 btn = CreateWindow("button", acp(MSGTR_Default),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
296 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
297 5, 417, 80, 25, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
298 (HMENU) ID_DEFAULTS,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
299 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
300 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
301 SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
302
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
303 /* extra stereo coefficient trackbar */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
304 track1 = CreateWindow(TRACKBAR_CLASS, "Coefficient",
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
305 WS_CHILD | WS_VISIBLE | WS_TABSTOP |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
306 WS_DISABLED | TBS_HORZ |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
307 TBS_BOTTOM | TBS_NOTICKS,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
308 165, 142, 245, 35, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
309 (HMENU) ID_TRACKBAR1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
310 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
311 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
312 SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETRANGE, 1, MAKELONG(-100, 100));
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
313
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
314 /* audio delay */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
315 track2 = CreateWindow(TRACKBAR_CLASS, "Audio delay",
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
316 WS_CHILD | WS_VISIBLE | WS_TABSTOP |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
317 WS_DISABLED | TBS_HORZ |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
318 TBS_BOTTOM | TBS_NOTICKS,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
319 165, 182, 245, 35, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
320 (HMENU) ID_TRACKBAR2,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
321 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
322 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
323 SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETRANGE, 1, MAKELONG(-1000, 1000));
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
324
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
325 /* cache */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
326 edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "cache",
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
327 WS_CHILD | WS_VISIBLE | WS_DISABLED |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
328 ES_LEFT | ES_AUTOHSCROLL,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
329 105, 225, 40, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
330 (HMENU) ID_EDIT1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
331 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
332 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
333 SendMessage(edit1, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
334
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
335 updown1 = CreateUpDownControl(WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
336 WS_DISABLED | UDS_SETBUDDYINT |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
337 UDS_ARROWKEYS | UDS_NOTHOUSANDS,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
338 145, 225, 20, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
339 ID_UPDOWN1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
340 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
341 (HWND)edit1, 0, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
342 SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETRANGE32, (WPARAM)0, (LPARAM)65535);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
343
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
344 /* autosync */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
345 edit2 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "autosync",
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
346 WS_CHILD | WS_VISIBLE | WS_DISABLED |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
347 ES_LEFT | ES_AUTOHSCROLL,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
348 355, 225, 40, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
349 (HMENU) ID_EDIT2,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
350 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
351 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
352 SendMessage(edit2, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
353
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
354 updown2 = CreateUpDownControl(WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
355 WS_DISABLED | UDS_SETBUDDYINT |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
356 UDS_ARROWKEYS | UDS_NOTHOUSANDS,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
357 395, 225, 20, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
358 ID_UPDOWN2,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
359 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
360 (HWND)edit2, 0, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
361 SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETRANGE32, (WPARAM)0, (LPARAM)10000);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
362
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
363 /* dvd and cd devices */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
364 edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
365 WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
366 ES_LEFT | ES_AUTOHSCROLL,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
367 165, 384, 20, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
368 (HMENU) ID_DVDDEVICE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
369 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
370 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
371 SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
372
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
373 edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
374 WS_CHILD | WS_VISIBLE |
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
375 ES_LEFT| ES_AUTOHSCROLL,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
376 295, 384, 20, 20, hwnd,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
377 (HMENU) ID_CDDEVICE,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
378 ((LPCREATESTRUCT) lParam) -> hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
379 NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
380 SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
381
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
382 while(video_out_drivers[i])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
383 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
384 const vo_info_t *info = video_out_drivers[i++]->info;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
385 if(!video_driver_list) gaddlist(&video_driver_list, (char *)info->short_name);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
386 SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_ADDSTRING, 0, (LPARAM) info->short_name);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
387 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
388 /* Special case for directx:noaccel */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
389 SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_ADDSTRING, 0, (LPARAM) "directx:noaccel");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
390 SendMessage(vo_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
391
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
392 while(audio_out_drivers[j])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
393 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
394 const ao_info_t *info = audio_out_drivers[j++]->info;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
395 if(!audio_driver_list)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
396 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
397 // FIXME: default priority (i.e. order in audio_out_drivers) should be fixed instead
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
398 // if win32 as default is really desirable
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
399 gaddlist(&audio_driver_list, "win32"/*(char *)info->short_name*/);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
400 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
401 SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_ADDSTRING, 0, (LPARAM) info->short_name);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
402 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
403 SendMessage(ao_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
404
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
405 /* priority list, i'm leaving out realtime for safety's sake */
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
406 SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityLow));
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
407 SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalBelow));
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
408 SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormal));
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
409 SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalAbove));
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
410 SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityHigh));
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
411 SendMessage(prio, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
412
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
413 /* set our preferences on what we already have */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
414 if(video_driver_list)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
415 SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
416 (WPARAM)SendMessage(vo_driver, CB_FINDSTRING, -1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
417 (LPARAM)video_driver_list[0]), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
418
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
419 if(audio_driver_list)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
420 SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
421 (WPARAM)SendMessage(ao_driver, CB_FINDSTRING, -1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
422 (LPARAM)audio_driver_list[0]), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
423
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
424 if(vo_doublebuffering)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
425 SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
426 if(vo_directrendering)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
427 SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 1, 0);
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
428 if(!player_idle_mode)
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
429 SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 1, 0);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
430 if(frame_dropping)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
431 SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
432 if(gtkAONorm)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
433 SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
434 if(soft_vol)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
435 SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
436 if(gtkAOExtraStereo)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
437 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
438 SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 1, 0);
33555
c5a19bbeac2b Cosmetic: Rename some GUI variables and functions.
ib
parents: 33298
diff changeset
439 if(!guiInfo.Playing)
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
440 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
441 EnableWindow(track1, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
442 EnableWindow(track2, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
443 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
444 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
445 else gtkAOExtraStereoMul = 1.0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
446 SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)stereopos);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
447
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
448 if(audio_delay)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
449 SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)delaypos);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
450
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
451 if(gtkCacheOn) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
452 SendDlgItemMessage(hwnd, ID_CACHE, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
453 EnableWindow(edit1, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
454 EnableWindow(updown1, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
455 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
456 else gtkCacheSize = 2048;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
457 SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 0, (LPARAM)gtkCacheSize);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
458
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
459 if(gtkAutoSyncOn) {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
460 SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
461 EnableWindow(edit2, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
462 EnableWindow(updown2, 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
463 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
464 else gtkAutoSync = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
465 SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
466
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
467 if(sub_window)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
468 SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
469
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
470 if(!osd_level)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
471 SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
472 else if(osd_level == 1)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
473 SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
474 else if(osd_level == 2)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
475 SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
476 else if(osd_level == 3)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
477 SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
478
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
479 if(dvd_device)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
480 SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)dvd_device);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
481 else SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
482
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
483 if(cdrom_device)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
484 SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)cdrom_device);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
485 else SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
486
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
487 if(proc_priority)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
488 SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
489 (WPARAM)SendMessage(prio, CB_FINDSTRING, -1,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
490 (LPARAM)proc_priority), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
491
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
492 else SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL, 2, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
493
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
494 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
495 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
496 case WM_CTLCOLORDLG:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
497 case WM_CTLCOLOREDIT:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
498 case WM_CTLCOLORBTN:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
499 case WM_CTLCOLORSTATIC:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
500 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
501 HDC hdc = (HDC)wParam;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
502 SetBkMode(hdc, TRANSPARENT);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
503 return (INT_PTR)SOLID_GREY;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
504 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
505 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
506 case WM_COMMAND:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
507 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
508 switch (LOWORD(wParam))
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
509 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
510 case ID_EXTRASTEREO:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
511 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
512 if(SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
513 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
514 EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR1), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
515 EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR2), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
516 } else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
517 EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR1), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
518 EnableWindow(GetDlgItem(hwnd, ID_TRACKBAR2), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
519 SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)10.0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
520 SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
521 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
522 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
523 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
524 case ID_CACHE:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
525 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
526 if(SendDlgItemMessage(hwnd, ID_CACHE, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
527 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
528 EnableWindow(GetDlgItem(hwnd, ID_EDIT1), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
529 EnableWindow(GetDlgItem(hwnd, ID_UPDOWN1), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
530 } else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
531 EnableWindow(GetDlgItem(hwnd, ID_EDIT1), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
532 EnableWindow(GetDlgItem(hwnd, ID_UPDOWN1), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
533 SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 1, (LPARAM)2048);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
534 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
535 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
536 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
537 case ID_AUTOSYNC:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
538 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
539 if(SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
540 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
541 EnableWindow(GetDlgItem(hwnd, ID_EDIT2), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
542 EnableWindow(GetDlgItem(hwnd, ID_UPDOWN2), 1);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
543 } else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
544 EnableWindow(GetDlgItem(hwnd, ID_EDIT2), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
545 EnableWindow(GetDlgItem(hwnd, ID_UPDOWN2), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
546 SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 1, (LPARAM)0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
547 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
548 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
549 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
550 case ID_DEFAULTS:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
551 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
552 set_defaults();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
553 SendDlgItemMessage(hwnd, ID_VO_DRIVER, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
554 (WPARAM)SendMessage(vo_driver, CB_FINDSTRING, -1, (LPARAM)"directx"), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
555
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
556 SendDlgItemMessage(hwnd, ID_AO_DRIVER, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
557 (WPARAM)SendMessage(ao_driver, CB_FINDSTRING, -1, (LPARAM)"dsound"), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
558
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
559 SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
560 (WPARAM)SendMessage(prio, CB_FINDSTRING, -1, (LPARAM)proc_priority), 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
561
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
562 SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_SETPOS, 1, (LPARAM)10.0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
563 SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETPOS, 1, (LPARAM)0.0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
564 SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_SETPOS32, 0, (LPARAM)gtkCacheSize);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
565 SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
566 SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
567 SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 0, 0);
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
568 SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 0, 0);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
569 SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
570 SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
571 SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
572 SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
573 SendDlgItemMessage(hwnd, ID_CACHE, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
574 SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
575 SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
576 SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
577 SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
578 SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
579 SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
580 SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
581 SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
582 SendMessage(hwnd, WM_COMMAND, (WPARAM)ID_APPLY, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
583 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
584 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
585 case ID_CANCEL:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
586 DestroyWindow(hwnd);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
587 return 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
588 case ID_APPLY:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
589 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
590 int strl;
33731
81f71d910333 Cosmetic: Change prefix for symbolic constants from GMP to GUI.
ib
parents: 33725
diff changeset
591 if(guiInfo.Playing) gui(GUI_SET_STATE, (void *)GUI_STOP);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
592
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
593 /* Set the video driver */
33298
f0733d37f56b Fix bug with gfree() definition in Win32 GUI.
ib
parents: 32068
diff changeset
594 free(video_driver_list[0]);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
595 strl = SendMessage(vo_driver, CB_GETCURSEL, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
596 video_driver_list[0] = malloc(strl);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
597 SendMessage(vo_driver, CB_GETLBTEXT, (WPARAM)strl,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
598 (LPARAM)video_driver_list[0]);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
599
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
600 /* Set the audio driver */
33298
f0733d37f56b Fix bug with gfree() definition in Win32 GUI.
ib
parents: 32068
diff changeset
601 free(audio_driver_list[0]);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
602 strl = SendMessage(ao_driver, CB_GETCURSEL, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
603 audio_driver_list[0] = malloc(strl);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
604 SendMessage(ao_driver, CB_GETLBTEXT, (WPARAM)strl,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
605 (LPARAM)audio_driver_list[0]);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
606
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
607 /* Set the priority level */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
608 SendMessage(prio, CB_GETLBTEXT, (WPARAM)SendMessage(prio, CB_GETCURSEL, 0, 0), (LPARAM)procprio);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
609 proc_priority = strdup(procprio);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
610
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
611 /* double buffering */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
612 if(SendDlgItemMessage(hwnd, ID_DOUBLE, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
613 vo_doublebuffering = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
614 else vo_doublebuffering = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
615
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
616 /* direct rendering */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
617 if(SendDlgItemMessage(hwnd, ID_DIRECT, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
618 vo_directrendering = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
619 else vo_directrendering = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
620
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
621 /* quit after playing */
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
622 if(SendDlgItemMessage(hwnd, ID_IDLE, BM_GETCHECK, 0, 0) == BST_CHECKED)
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
623 player_idle_mode = 0;
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
624 else player_idle_mode = 1;
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
625
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
626 /* frame dropping */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
627 if(SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
628 frame_dropping = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
629 else frame_dropping = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
630
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
631 /* normalize */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
632 if(SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
633 gtkAONorm = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
634 else gtkAONorm = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
635
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
636 /* software mixer */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
637 if(SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
638 soft_vol = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
639 else soft_vol = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
640
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
641 /* extra stereo */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
642 if(SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
643 gtkAOExtraStereo = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
644 else {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
645 gtkAOExtraStereo = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
646 gtkAOExtraStereoMul = 10.0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
647 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
648 gtkAOExtraStereoMul = SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_GETPOS, 0, 0) / 10.0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
649
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
650 /* audio delay */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
651 audio_delay = SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_GETPOS, 0, 0) / 100.0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
652
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
653 /* cache */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
654 if(SendDlgItemMessage(hwnd, ID_CACHE, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
655 gtkCacheOn = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
656 else gtkCacheOn = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
657 gtkCacheSize = SendDlgItemMessage(hwnd, ID_UPDOWN1, UDM_GETPOS32, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
658
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
659 /* autosync */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
660 if(SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
661 gtkAutoSyncOn = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
662 else gtkAutoSyncOn = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
663 gtkAutoSync = SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_GETPOS32, 0, 0);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
664
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
665 /* sub window */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
666 if(SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
667 sub_window = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
668 else sub_window = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
669
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
670 /* osd level */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
671 if(SendDlgItemMessage(hwnd, ID_NONE, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
672 osd_level = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
673 else if(SendDlgItemMessage(hwnd, ID_OSD1, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
674 osd_level = 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
675 else if(SendDlgItemMessage(hwnd, ID_OSD2, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
676 osd_level = 2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
677 else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
678 osd_level = 3;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
679
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
680 /* dvd and cd devices */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
681 SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)dvddevice);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
682 dvd_device = strdup(dvddevice);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
683 SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
684 cdrom_device = strdup(cdromdevice);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
685
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
686 MessageBox(hwnd, acp(MSGTR_PREFERENCES_Message), acp(MSGTR_MSGBOX_LABEL_Warning), MB_OK);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
687 DestroyWindow(hwnd);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
688 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
689 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
690 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
691 return 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
692 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
693 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
694 return DefWindowProc(hwnd, iMsg, wParam, lParam);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
695 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
696
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
697 void display_prefswindow(gui_t *gui)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
698 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
699 HWND hWnd;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
700 HINSTANCE hInstance = GetModuleHandle(NULL);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
701 WNDCLASS wc;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
702 int x, y;
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
703 if(FindWindow(NULL, acp(MSGTR_Preferences))) return;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
704 wc.style = CS_HREDRAW | CS_VREDRAW;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
705 wc.lpfnWndProc = PrefsWndProc;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
706 wc.cbClsExtra = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
707 wc.cbWndExtra = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
708 wc.hInstance = hInstance;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
709 wc.hCursor = LoadCursor(NULL,IDC_ARROW);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
710 wc.hIcon = gui->icon;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
711 wc.hbrBackground = SOLID_GREY;
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
712 wc.lpszClassName = acp(MSGTR_Preferences);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
713 wc.lpszMenuName = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
714 RegisterClass(&wc);
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
715 x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (425 / 2);
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
716 y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (474 / 2);
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
717 hWnd = CreateWindow(acp(MSGTR_Preferences),
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 34089
diff changeset
718 acp(MSGTR_Preferences),
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
719 WS_POPUPWINDOW | WS_CAPTION,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
720 x,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
721 y,
34164
d57ed389b6e2 Resize the Win32 GUI preference window and reposition items.
ib
parents: 34163
diff changeset
722 425,
34087
b2d908cd8a1f Add idle option to Win32 GUI preferences dialog.
ib
parents: 33761
diff changeset
723 474,
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
724 NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
725 NULL,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
726 hInstance,
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
727 NULL);
33638
dbca6aa18b50 Cast new user data value in SetWindowLongPtr() to LONG_PTR.
ib
parents: 33619
diff changeset
728 SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
729 ShowWindow(hWnd, SW_SHOW);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
730 UpdateWindow(hWnd);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
731 }