summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/database/profilemanager.cpp23
-rw-r--r--src/resource.rc6
2 files changed, 23 insertions, 6 deletions
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index ea5b7e1a3b..a221e29a44 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -392,7 +392,7 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam,
ListView_InsertColumn(hwndList, 0, &col);
col.pszText = TranslateT("Driver");
- col.cx = 150;
+ col.cx = 150 - GetSystemMetrics(SM_CXVSCROLL);
ListView_InsertColumn(hwndList, 1, &col);
col.pszText = TranslateT("Size");
@@ -455,11 +455,24 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam,
lvht.pt.x = GET_X_LPARAM(lParam);
lvht.pt.y = GET_Y_LPARAM(lParam);
ScreenToClient(hwndList, &lvht.pt);
- if (ListView_HitTest(hwndList, &lvht) < 0)
- break;
- lvht.pt.x = GET_X_LPARAM(lParam);
- lvht.pt.y = GET_Y_LPARAM(lParam);
+ if (ListView_HitTest(hwndList, &lvht) < 0) {
+ if (lParam != -1)
+ break;
+
+ lvht.iItem = ListView_GetSelectionMark(hwndList);
+ RECT rc = { 0 };
+ if (!ListView_GetItemRect(hwndList, lvht.iItem, &rc, LVIR_LABEL))
+ break;
+
+ lvht.pt.x = rc.left;
+ lvht.pt.y = rc.bottom;
+ ClientToScreen(hwndList, &lvht.pt);
+ }
+ else {
+ lvht.pt.x = GET_X_LPARAM(lParam);
+ lvht.pt.y = GET_Y_LPARAM(lParam);
+ }
HMENU hMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_STRING, 1, TranslateT("Run"));
diff --git a/src/resource.rc b/src/resource.rc
index 34597bf494..287b2ec578 100644
--- a/src/resource.rc
+++ b/src/resource.rc
@@ -391,7 +391,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "List1",IDC_PROFILELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_TABSTOP,0,3,365,138
+ CONTROL "List1",IDC_PROFILELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,0,3,207,117
END
IDD_PROFILE_NEW DIALOGEX 0, 0, 208, 122
@@ -1000,6 +1000,10 @@ BEGIN
HORZGUIDE, 113
END
+ IDD_PROFILE_SELECTION, DIALOG
+ BEGIN
+ END
+
IDD_PROFILE_NEW, DIALOG
BEGIN
LEFTMARGIN, 7