Skip to content

Commit

Permalink
Display link as hyperlink (#312)
Browse files Browse the repository at this point in the history
* Display link as hyperlink

* Progress bar changes

* use https links

* Launch url while clicking

* remove mousehover
  • Loading branch information
jyvenugo authored Dec 18, 2019
1 parent f6cf92d commit 16737c0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions MsixCore/msixmgr/InstallUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,23 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
PostQuitMessage(0);
exit(0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code)
{
case EN_LINK:
ENLINK * enLinkInfo = (ENLINK *)lParam;
if (enLinkInfo->msg == WM_LBUTTONUP)
{
SendMessage(g_staticErrorDescHWnd, EM_EXSETSEL, 0, (LPARAM)&(enLinkInfo->chrg));

WCHAR url[MAX_PATH];
SendMessage(g_staticErrorDescHWnd, EM_GETSELTEXT, 0, (LPARAM)&url);

ShellExecute(NULL, L"open", url, NULL, NULL, SW_SHOWNORMAL);
}
break;
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
break;
Expand Down Expand Up @@ -594,6 +611,8 @@ BOOL UI::CreateDisplayErrorText(HWND parentHWnd, RECT parentRect)
parentRect.left + 50, parentRect.bottom - 110, 375, 80,
parentHWnd, (HMENU)IDC_STATICERRORCONTROL, reinterpret_cast<HINSTANCE>(GetWindowLongPtr(parentHWnd, GWLP_HINSTANCE)), NULL);

SendMessage(g_staticErrorDescHWnd, EM_SETEVENTMASK, 0, ENM_LINK);
SendMessage(g_staticErrorDescHWnd, EM_AUTOURLDETECT, (WPARAM)TRUE, (LPARAM)0);
return TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions MsixCore/msixmgr/msixmgr.rc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ BEGIN
IDS_STRING_LOADING_PACKAGE_OPEN_ERROR "Cannot open app package"
IDS_STRING_SIG_MISSING_ERROR "Ask the app developer for a new app package. This one isn't signed with a trusted certificate."
IDS_STRING_ROOT_SIG_UNTRUSTED_ERROR "Either you need a new certificate installed for this app package, or you need a new app package with trusted certificates. Your system administrator or the app developer can help. A certificate chain processed, but terminated in a root certificate which isn't trusted."
IDS_STRING_CANNOT_OPEN_PACKAGE_ERROR "Unable to open package. Please go to aka.ms/msix for more information."
IDS_STRING_GENERIC_INSTALL_FAILED_ERROR "Unable to install package. Please go to aka.ms/msix for more information."
IDS_STRING_CANNOT_OPEN_PACKAGE_ERROR "Unable to open package. Please go to https://aka.ms/msix for more information."
IDS_STRING_GENERIC_INSTALL_FAILED_ERROR "Unable to install package. Please go to https://aka.ms/msix for more information."
IDS_STRING_INVALID_TDF_ERROR "A Prerequisite for an install could not be satisfied."
IDS_STRING_INVALID_ARCHITECTURE_ERROR "The deployment operation failed because the package targets the wrong processor architecture."
IDS_STRING_PACKAGE_DOWNGRADE_ERROR "The package could not be installed because a higher version of this package is already installed."
Expand Down

0 comments on commit 16737c0

Please sign in to comment.