1 |
|
/***************************************************************************** |
2 |
|
* |
3 |
|
* XVID MPEG-4 VIDEO CODEC |
4 |
|
* - Configure from command line - |
5 |
|
* |
6 |
|
* Copyright(C) 2002-2004 Peter Ross <pross@xvid.org> |
7 |
|
* |
8 |
|
* This program is free software ; you can redistribute it and/or modify |
9 |
|
* it under the terms of the GNU General Public License as published by |
10 |
|
* the Free Software Foundation ; either version 2 of the License, or |
11 |
|
* (at your option) any later version. |
12 |
|
* |
13 |
|
* This program is distributed in the hope that it will be useful, |
14 |
|
* but WITHOUT ANY WARRANTY ; without even the implied warranty of |
15 |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
* GNU General Public License for more details. |
17 |
|
* |
18 |
|
* You should have received a copy of the GNU General Public License |
19 |
|
* along with this program ; if not, write to the Free Software |
20 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
|
* |
22 |
|
* $Id$ |
23 |
|
* |
24 |
|
****************************************************************************/ |
25 |
|
|
26 |
|
|
27 |
|
#include <windows.h> |
28 |
|
#include <commctrl.h> |
29 |
|
#include "config.h" |
30 |
|
#include "resource.h" |
31 |
|
|
32 |
|
/* "DllEntryPoint@12" in strmbase.lib\dllentry.obj stores the module in g_hInst |
33 |
|
this function must be called on DllEntry, inorder for property pages to function |
34 |
|
likewise, we need g_hInst inorder to display property sheets from command line |
35 |
|
*/ |
36 |
|
extern HINSTANCE g_hInst; |
37 |
|
|
38 |
|
|
39 |
|
int adv_dialog(HWND hwndOwner) |
40 |
|
{ |
41 |
|
PROPSHEETPAGE psp [1]; |
42 |
|
PROPSHEETHEADER psh; |
43 |
|
|
44 |
|
psp[0].dwSize = sizeof (PROPSHEETPAGE); |
45 |
|
psp[0].dwFlags = PSP_USETITLE; |
46 |
|
psp[0].hInstance = g_hInst; |
47 |
|
psp[0].pszTemplate = MAKEINTRESOURCE (IDD_ABOUT); |
48 |
|
psp[0].pszIcon = NULL; |
49 |
|
psp[0].pfnDlgProc = adv_proc; |
50 |
|
psp[0].pszTitle = "About"; |
51 |
|
psp[0].lParam = 0; |
52 |
|
|
53 |
|
psh.dwSize = sizeof (PROPSHEETHEADER); |
54 |
|
psh.dwFlags = PSH_PROPSHEETPAGE; |
55 |
|
psh.hwndParent = hwndOwner; |
56 |
|
psh.hInstance = g_hInst; |
57 |
|
psh.pszIcon = NULL; |
58 |
|
psh.pszCaption = (LPSTR)"XviD Configuration"; |
59 |
|
psh.nPages = sizeof (psp) / sizeof (PROPSHEETPAGE); |
60 |
|
psh.ppsp = (LPCPROPSHEETPAGE) &psp; |
61 |
|
|
62 |
|
return PropertySheet (&psh); |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
void CALLBACK Configure(HWND hWndParent, HINSTANCE hInstParent, LPSTR lpCmdLine, int nCmdShow ) |
68 |
|
{ |
69 |
|
InitCommonControls(); |
70 |
|
LoadRegistryInfo(); |
71 |
|
adv_dialog( GetDesktopWindow() ); |
72 |
|
} |