Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display link as hyperlink #312

Merged
merged 7 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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