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
978d12d0
Commit
978d12d0
authored
Sep 16, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load riched20.dll on demand, and unload it after it's used (based on a
patch by Rob Shearman).
parent
67189f9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
dialog.c
dlls/msi/dialog.c
+14
-7
No files found.
dlls/msi/dialog.c
View file @
978d12d0
...
...
@@ -56,6 +56,7 @@ struct msi_control_tag
HBITMAP
hBitmap
;
HICON
hIcon
;
LPWSTR
tabnext
;
HMODULE
hDll
;
WCHAR
name
[
1
];
};
...
...
@@ -134,7 +135,6 @@ static LRESULT WINAPI MSIRadioGroup_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
static
DWORD
uiThreadId
;
static
HWND
hMsiHiddenWindow
;
static
HMODULE
hRichedit
;
static
INT
msi_dialog_scale_unit
(
msi_dialog
*
dialog
,
INT
val
)
{
...
...
@@ -303,6 +303,7 @@ static msi_control *msi_dialog_create_window( msi_dialog *dialog,
control
->
value
=
NULL
;
control
->
hBitmap
=
NULL
;
control
->
hIcon
=
NULL
;
control
->
hDll
=
NULL
;
control
->
tabnext
=
strdupW
(
MSI_RecordGetString
(
rec
,
11
)
);
x
=
MSI_RecordGetInteger
(
rec
,
4
);
...
...
@@ -702,10 +703,17 @@ static UINT msi_dialog_scrolltext_control( msi_dialog *dialog, MSIRECORD *rec )
LPCWSTR
text
;
EDITSTREAM
es
;
DWORD
style
;
HMODULE
hRichedit
;
hRichedit
=
LoadLibraryA
(
"riched20"
);
style
=
WS_BORDER
|
ES_MULTILINE
|
WS_VSCROLL
|
ES_READONLY
|
ES_AUTOVSCROLL
|
WS_TABSTOP
;
control
=
msi_dialog_add_control
(
dialog
,
rec
,
szRichEdit20W
,
style
);
if
(
!
control
)
return
ERROR_FUNCTION_FAILED
;
control
->
hDll
=
hRichedit
;
text
=
MSI_RecordGetString
(
rec
,
10
);
info
.
string
=
strdupWtoA
(
text
);
...
...
@@ -1903,6 +1911,9 @@ void msi_dialog_destroy( msi_dialog *dialog )
if
(
dialog
->
hwnd
)
ShowWindow
(
dialog
->
hwnd
,
SW_HIDE
);
if
(
dialog
->
hwnd
)
DestroyWindow
(
dialog
->
hwnd
);
/* destroy the list of controls */
while
(
dialog
->
control_list
)
{
...
...
@@ -1917,6 +1928,8 @@ void msi_dialog_destroy( msi_dialog *dialog )
DestroyIcon
(
t
->
hIcon
);
HeapFree
(
GetProcessHeap
(),
0
,
t
->
tabnext
);
HeapFree
(
GetProcessHeap
(),
0
,
t
);
if
(
t
->
hDll
)
FreeLibrary
(
t
->
hDll
);
}
/* destroy the list of fonts */
...
...
@@ -1929,9 +1942,6 @@ void msi_dialog_destroy( msi_dialog *dialog )
}
HeapFree
(
GetProcessHeap
(),
0
,
dialog
->
default_font
);
if
(
dialog
->
hwnd
)
DestroyWindow
(
dialog
->
hwnd
);
msiobj_release
(
&
dialog
->
package
->
hdr
);
dialog
->
package
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
dialog
);
...
...
@@ -1966,8 +1976,6 @@ BOOL msi_dialog_register_class( void )
if
(
!
hMsiHiddenWindow
)
return
FALSE
;
hRichedit
=
LoadLibraryA
(
"riched20"
);
return
TRUE
;
}
...
...
@@ -1976,5 +1984,4 @@ void msi_dialog_unregister_class( void )
DestroyWindow
(
hMsiHiddenWindow
);
UnregisterClassW
(
szMsiDialogClass
,
NULL
);
uiThreadId
=
0
;
FreeLibrary
(
hRichedit
);
}
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