Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9b386b73
Commit
9b386b73
authored
Jun 28, 2004
by
Hannu Valtonen
Committed by
Alexandre Julliard
Jun 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't display the commandline text (A trace still gives it).
Set a few fonts to avoid using the horrible system font on native Windows.
parent
ec596c06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
main.c
programs/uninstaller/main.c
+11
-18
No files found.
programs/uninstaller/main.c
View file @
9b386b73
...
...
@@ -2,6 +2,7 @@
* Q&D Uninstaller (main.c)
*
* Copyright 2000 Andreas Mohr <andi@lisas.de>
* Copyright 2004 Hannu Valtonen <Hannu.Valtonen@hut.fi>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -318,11 +319,12 @@ void UninstallProgram(void)
LRESULT
WINAPI
MainProc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HFONT
static_font
,
listbox_font
;
HDC
hdc
;
PAINTSTRUCT
ps
;
TEXTMETRIC
tm
;
int
cxChar
,
cyChar
,
i
,
y
,
bx
,
maxx
,
maxy
,
wx
,
wy
;
static
HWND
hwndList
=
0
,
hwndEdi
t
=
0
;
static
HWND
hwndList
=
0
,
static_tex
t
=
0
;
DWORD
style
;
RECT
rect
;
...
...
@@ -331,6 +333,8 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
hdc
=
GetDC
(
hWnd
);
GetTextMetrics
(
hdc
,
&
tm
);
static_font
=
CreateFont
(
tm
.
tmHeight
+
tm
.
tmExternalLeading
,
0
,
0
,
0
,
600
,
FALSE
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"Times New Roman"
);
listbox_font
=
CreateFont
(
tm
.
tmHeight
+
tm
.
tmExternalLeading
,
0
,
0
,
0
,
0
,
TRUE
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"Times New Roman"
);
cxChar
=
tm
.
tmAveCharWidth
;
cyChar
=
tm
.
tmHeight
+
tm
.
tmExternalLeading
;
ReleaseDC
(
hWnd
,
hdc
);
...
...
@@ -339,14 +343,15 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
#ifdef USE_MULTIPLESEL
style
|=
LBS_MULTIPLESEL
;
#endif
bx
=
maxx
=
cxChar
*
5
;
bx
=
maxx
=
cxChar
*
3
;
y
=
maxy
=
cyChar
*
1
;
CreateWindow
(
"static"
,
program_description
,
static_text
=
CreateWindow
(
"static"
,
program_description
,
WS_CHILD
|
WS_VISIBLE
|
SS_LEFT
,
maxx
,
maxy
,
cxChar
*
sizeof
(
program_description
),
cyChar
*
1
,
hWnd
,
(
HMENU
)
1
,
((
LPCREATESTRUCT
)
lParam
)
->
hInstance
,
NULL
);
SendMessage
(
static_text
,
WM_SETFONT
,
(
WPARAM
)
static_font
,
MAKELPARAM
(
FALSE
,
0
));
maxy
+=
cyChar
*
2
;
/*static text + distance */
hwndList
=
CreateWindow
(
"listbox"
,
NULL
,
style
,
...
...
@@ -354,6 +359,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
cxChar
*
50
+
GetSystemMetrics
(
SM_CXVSCROLL
),
cyChar
*
10
,
hWnd
,
(
HMENU
)
1
,
(
HINSTANCE
)
GetWindowLong
(
hWnd
,
GWL_HINSTANCE
),
NULL
);
SendMessage
(
hwndList
,
WM_SETFONT
,
(
WPARAM
)
listbox_font
,
MAKELPARAM
(
FALSE
,
0
));
GetWindowRect
(
hwndList
,
&
rect
);
maxx
+=
(
rect
.
right
-
rect
.
left
)
*
1
.
1
;
maxy
+=
(
rect
.
bottom
-
rect
.
top
)
*
1
.
1
;
...
...
@@ -372,20 +378,8 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
PostQuitMessage
(
0
);
y
+=
2
*
cyChar
;
}
maxx
+=
wx
+
cxChar
*
5
;
CreateWindow
(
"static"
,
"Command line to be executed:"
,
WS_CHILD
|
WS_VISIBLE
|
SS_LEFT
,
bx
,
maxy
,
cxChar
*
50
,
cyChar
,
hWnd
,
(
HMENU
)
1
,
((
LPCREATESTRUCT
)
lParam
)
->
hInstance
,
NULL
);
maxy
+=
cyChar
;
hwndEdit
=
CreateWindow
(
"edit"
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
WS_BORDER
|
ES_LEFT
|
ES_MULTILINE
|
ES_READONLY
,
bx
,
maxy
,
maxx
-
(
2
*
bx
),
(
cyChar
*
2
)
+
4
,
hWnd
,
(
HMENU
)
1
,
((
LPCREATESTRUCT
)
lParam
)
->
hInstance
,
NULL
);
maxy
+=
(
cyChar
*
2
)
+
4
+
cyChar
*
3
;
/* edit ctrl + bottom border */
maxx
+=
wx
+
cxChar
*
4
;
maxy
+=
cyChar
*
2
;
/* window border */
SetWindowPos
(
hWnd
,
0
,
0
,
0
,
maxx
,
maxy
,
SWP_NOMOVE
);
...
...
@@ -443,7 +437,6 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
entries
[
sel
].
active
^=
1
;
/* toggle */
WINE_TRACE
(
"toggling %d %s
\n
"
,
entries
[
sel
].
active
,
wine_dbgstr_w
(
entries
[
oldsel
].
descr
));
SendMessage
(
hwndEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
entries
[
sel
].
command
);
oldsel
=
sel
;
}
}
...
...
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