Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0f0ee255
Commit
0f0ee255
authored
Jun 22, 2006
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Added system configuration dialog.
parent
0defa4e8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
1 deletion
+93
-1
En.rc
programs/oleview/En.rc
+13
-0
oleview.c
programs/oleview/oleview.c
+76
-1
resource.h
programs/oleview/resource.h
+4
-0
No files found.
programs/oleview/En.rc
View file @
0f0ee255
...
...
@@ -128,3 +128,16 @@ FONT 8, "MS Shell Dlg"
DEFPUSHBUTTON "&OK", IDOK, 200, 5, 45, 14
PUSHBUTTON "&Cancel", IDCANCEL, 200, 22, 45, 14
}
DLG_SYSCONF DIALOG DISCARDABLE 0, 0, 170, 100
STYLE DS_MODALFRAME | DS_NOIDLEMSG | WS_CAPTION | WS_SYSMENU
CAPTION "System Configuration"
FONT 8, "MS Shell Dlg"
{
LTEXT "System Settings", IDIGNORE, 5, 6, 160, 8
CHECKBOX "&Enable Distributed COM", IDC_ENABLEDCOM, 5, 20, 160, 10, WS_TABSTOP | WS_GROUP | BS_AUTOCHECKBOX
CHECKBOX "Enable &Remote Connections (Win95 only)", IDC_ENABLEREMOTE, 5, 35, 160, 10, WS_TABSTOP | WS_GROUP | BS_AUTOCHECKBOX
LTEXT "These settings changes only register values.\nIt has no effect on Wine performance.", IDIGNORE, 5, 50, 160, 40
DEFPUSHBUTTON "&OK", IDOK, 70, 80, 45, 14
PUSHBUTTON "&Cancel", IDCANCEL, 120, 80, 45, 14
}
programs/oleview/oleview.c
View file @
0f0ee255
...
...
@@ -24,7 +24,79 @@ GLOBALS globals;
static
WCHAR
wszRegEdit
[]
=
{
'r'
,
'e'
,
'g'
,
'e'
,
'd'
,
'i'
,
't'
,
'.'
,
'e'
,
'x'
,
'e'
,
'\0'
};
static
WCHAR
wszFormat
[]
=
{
'<'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'\n'
,
' '
,
' '
,
' '
,
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'i'
,
'd'
,
'='
,
'\"'
,
'c'
,
'l'
,
's'
,
'i'
,
'd'
,
':'
,
'%'
,
's'
,
'\"'
,
'\n'
,
'>'
,
'\n'
,
'<'
,
'/'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'>'
};
'>'
,
'\n'
,
'<'
,
'/'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'>'
,
'\0'
};
INT_PTR
CALLBACK
SysConfProc
(
HWND
hDlgWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HKEY
hKey
;
WCHAR
buffer
[
MAX_LOAD_STRING
];
DWORD
bufSize
;
WCHAR
wszReg
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'O'
,
'L'
,
'E'
,
'\\'
,
'\0'
};
WCHAR
wszEnableDCOM
[]
=
{
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'D'
,
'C'
,
'O'
,
'M'
,
'\0'
};
WCHAR
wszEnableRemote
[]
=
{
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'R'
,
'e'
,
'm'
,
'o'
,
't'
,
'e'
,
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'\0'
};
WCHAR
wszYes
[]
=
{
'Y'
,
'\0'
};
WCHAR
wszNo
[]
=
{
'N'
,
'\0'
};
switch
(
uMsg
)
{
case
WM_INITDIALOG
:
if
(
RegOpenKey
(
HKEY_LOCAL_MACHINE
,
wszReg
,
&
hKey
)
!=
ERROR_SUCCESS
)
RegCreateKey
(
HKEY_LOCAL_MACHINE
,
wszReg
,
&
hKey
);
bufSize
=
sizeof
(
buffer
);
if
(
RegGetValue
(
hKey
,
NULL
,
wszEnableDCOM
,
RRF_RT_REG_SZ
,
NULL
,
buffer
,
&
bufSize
)
!=
ERROR_SUCCESS
)
{
bufSize
=
sizeof
(
wszYes
);
RegSetValueEx
(
hKey
,
wszEnableDCOM
,
0
,
REG_SZ
,
(
BYTE
*
)
wszYes
,
bufSize
);
}
CheckDlgButton
(
hDlgWnd
,
IDC_ENABLEDCOM
,
buffer
[
0
]
==
'Y'
?
BST_CHECKED
:
BST_UNCHECKED
);
bufSize
=
sizeof
(
buffer
);
if
(
RegGetValue
(
hKey
,
NULL
,
wszEnableRemote
,
RRF_RT_REG_SZ
,
NULL
,
buffer
,
&
bufSize
)
!=
ERROR_SUCCESS
)
{
bufSize
=
sizeof
(
wszYes
);
RegSetValueEx
(
hKey
,
wszEnableRemote
,
0
,
REG_SZ
,
(
BYTE
*
)
wszYes
,
bufSize
);
}
CheckDlgButton
(
hDlgWnd
,
IDC_ENABLEREMOTE
,
buffer
[
0
]
==
'Y'
?
BST_CHECKED
:
BST_UNCHECKED
);
RegCloseKey
(
hKey
);
return
TRUE
;
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
))
{
case
IDOK
:
bufSize
=
sizeof
(
wszYes
);
RegOpenKey
(
HKEY_LOCAL_MACHINE
,
wszReg
,
&
hKey
);
RegSetValueEx
(
hKey
,
wszEnableDCOM
,
0
,
REG_SZ
,
IsDlgButtonChecked
(
hDlgWnd
,
IDC_ENABLEDCOM
)
==
BST_CHECKED
?
(
BYTE
*
)
wszYes
:
(
BYTE
*
)
wszNo
,
bufSize
);
RegSetValueEx
(
hKey
,
wszEnableRemote
,
0
,
REG_SZ
,
IsDlgButtonChecked
(
hDlgWnd
,
IDC_ENABLEREMOTE
)
==
BST_CHECKED
?
(
BYTE
*
)
wszYes
:
(
BYTE
*
)
wszNo
,
bufSize
);
RegCloseKey
(
hKey
);
EndDialog
(
hDlgWnd
,
IDOK
);
return
TRUE
;
case
IDCANCEL
:
EndDialog
(
hDlgWnd
,
IDCANCEL
);
return
TRUE
;
}
}
return
FALSE
;
}
INT_PTR
CALLBACK
CreateInstOnProc
(
HWND
hDlgWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -295,6 +367,9 @@ int MenuCommand(WPARAM wParam, HWND hWnd)
vis
?
MF_UNCHECKED
:
MF_CHECKED
);
ResizeChild
();
break
;
case
IDM_SYSCONF
:
DialogBox
(
0
,
MAKEINTRESOURCE
(
DLG_SYSCONF
),
hWnd
,
SysConfProc
);
break
;
case
IDM_TOOLBAR
:
vis
=
IsWindowVisible
(
globals
.
hToolBar
);
ShowWindow
(
globals
.
hToolBar
,
vis
?
SW_HIDE
:
SW_SHOW
);
...
...
programs/oleview/resource.h
View file @
0f0ee255
...
...
@@ -70,3 +70,7 @@
#define DLG_CREATEINSTON 1000
#define IDC_MACHINE 1001
#define DLG_SYSCONF 1010
#define IDC_ENABLEDCOM 1011
#define IDC_ENABLEREMOTE 1012
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment