diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ca/PrintEula.cpp | 18 | ||||
| -rw-r--r-- | src/ca/uica.vcxproj | 4 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/ca/PrintEula.cpp b/src/ca/PrintEula.cpp index 770a082c..b19de9a6 100644 --- a/src/ca/PrintEula.cpp +++ b/src/ca/PrintEula.cpp | |||
| @@ -32,6 +32,7 @@ static void ShowErrorMessage(__in HRESULT hr); | |||
| 32 | //Global variables | 32 | //Global variables |
| 33 | PRINTDLGEXW* vpPrintDlg = NULL; //Parameters for print (needed on both sides of WndProc callbacks) | 33 | PRINTDLGEXW* vpPrintDlg = NULL; //Parameters for print (needed on both sides of WndProc callbacks) |
| 34 | LPSTR vpszEulaText = NULL; | 34 | LPSTR vpszEulaText = NULL; |
| 35 | LPCWSTR vwzRichEditClass = NULL; | ||
| 35 | HRESULT vhr = S_OK; //Global hr, used by the functions called from WndProc to set errorcode | 36 | HRESULT vhr = S_OK; //Global hr, used by the functions called from WndProc to set errorcode |
| 36 | 37 | ||
| 37 | 38 | ||
| @@ -72,8 +73,18 @@ extern "C" UINT __stdcall PrintEula(MSIHANDLE hInstall) | |||
| 72 | ExitOnFailure(hr, "failed to read Eula text from MSI database"); | 73 | ExitOnFailure(hr, "failed to read Eula text from MSI database"); |
| 73 | 74 | ||
| 74 | // Have to load Rich Edit since we'll be creating a Rich Edit control in the window | 75 | // Have to load Rich Edit since we'll be creating a Rich Edit control in the window |
| 75 | hr = LoadSystemLibrary(L"Riched20.dll", &hRichEdit); | 76 | hr = LoadSystemLibrary(L"Msftedit.dll", &hRichEdit); |
| 76 | ExitOnFailure(hr, "failed to load rich edit 2.0 library"); | 77 | if (SUCCEEDED(hr)) |
| 78 | { | ||
| 79 | vwzRichEditClass = MSFTEDIT_CLASS; | ||
| 80 | } | ||
| 81 | else | ||
| 82 | { | ||
| 83 | hr = LoadSystemLibrary(L"Riched20.dll", &hRichEdit); | ||
| 84 | ExitOnFailure(hr, "failed to load rich edit 2.0 library"); | ||
| 85 | |||
| 86 | vwzRichEditClass = RICHEDIT_CLASSW; | ||
| 87 | } | ||
| 77 | 88 | ||
| 78 | hr = CreateRichTextWindow(&hWndMain, &fRegisteredClass); | 89 | hr = CreateRichTextWindow(&hWndMain, &fRegisteredClass); |
| 79 | ExitOnFailure(hr, "failed to create rich text window for printing"); | 90 | ExitOnFailure(hr, "failed to create rich text window for printing"); |
| @@ -113,6 +124,7 @@ LExit: | |||
| 113 | ::UnregisterClassW(WINDOW_CLASS, NULL); | 124 | ::UnregisterClassW(WINDOW_CLASS, NULL); |
| 114 | } | 125 | } |
| 115 | 126 | ||
| 127 | vwzRichEditClass = NULL; | ||
| 116 | if (NULL != hRichEdit) | 128 | if (NULL != hRichEdit) |
| 117 | { | 129 | { |
| 118 | ::FreeLibrary(hRichEdit); | 130 | ::FreeLibrary(hRichEdit); |
| @@ -242,7 +254,7 @@ LRESULT CALLBACK WndProc( | |||
| 242 | switch (message) | 254 | switch (message) |
| 243 | { | 255 | { |
| 244 | case WM_CREATE: | 256 | case WM_CREATE: |
| 245 | hWndRichEdit = ::CreateWindowExW(WS_EX_CLIENTEDGE, RICHEDIT_CLASSW, L"", ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_VSCROLL, CONTROL_X_COORDINATE, CONTROL_Y_COORDINATE, CONTROL_WIDTH, CONTROL_HEIGHT, hWnd, NULL, NULL, NULL); | 257 | hWndRichEdit = ::CreateWindowExW(WS_EX_CLIENTEDGE, vwzRichEditClass, L"", ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_VSCROLL, CONTROL_X_COORDINATE, CONTROL_Y_COORDINATE, CONTROL_WIDTH, CONTROL_HEIGHT, hWnd, NULL, NULL, NULL); |
| 246 | break; | 258 | break; |
| 247 | case WM_COMMAND: | 259 | case WM_COMMAND: |
| 248 | wmId = LOWORD(wParam); | 260 | wmId = LOWORD(wParam); |
diff --git a/src/ca/uica.vcxproj b/src/ca/uica.vcxproj index 09501a32..5ded1266 100644 --- a/src/ca/uica.vcxproj +++ b/src/ca/uica.vcxproj | |||
| @@ -48,8 +48,8 @@ | |||
| 48 | </ItemGroup> | 48 | </ItemGroup> |
| 49 | 49 | ||
| 50 | <ItemGroup> | 50 | <ItemGroup> |
| 51 | <PackageReference Include="WixToolset.Dutil" Version="4.0.65" /> | 51 | <PackageReference Include="WixToolset.Dutil" Version="4.0.72" /> |
| 52 | <PackageReference Include="WixToolset.WcaUtil" Version="4.0.18" /> | 52 | <PackageReference Include="WixToolset.WcaUtil" Version="4.0.19" /> |
| 53 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" /> | 53 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" /> |
| 54 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" /> | 54 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" /> |
| 55 | </ItemGroup> | 55 | </ItemGroup> |
