mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
Improve file extension movement between ListBox in Preferences dialog
Now mouse double click can be used to move File extension between ListBoxes. Closes #3595
This commit is contained in:
parent
a7c1e354b9
commit
d5b01d61b8
@ -121,6 +121,24 @@ INT_PTR CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
|
|||||||
|
|
||||||
case WM_COMMAND :
|
case WM_COMMAND :
|
||||||
{
|
{
|
||||||
|
// Handle File association list extension
|
||||||
|
if (LOWORD(wParam) == IDC_REGEXT_LANGEXT_LIST || LOWORD(wParam) == IDC_REGEXT_REGISTEREDEXTS_LIST)
|
||||||
|
{
|
||||||
|
// On double click an item in the list then toggle the item between both lists
|
||||||
|
// by simulating "<-" or "->" button clicked
|
||||||
|
if (HIWORD(wParam) == LBN_DBLCLK)
|
||||||
|
{
|
||||||
|
// Check whether click happened on a item not in empty area
|
||||||
|
if (-1 != ::SendDlgItemMessage(_hSelf, LOWORD(wParam), LB_GETCURSEL, 0, 0))
|
||||||
|
{
|
||||||
|
HWND(lParam) == ::GetDlgItem(_hSelf, IDC_REGEXT_LANGEXT_LIST) ?
|
||||||
|
::SendMessage(_hSelf, WM_COMMAND, IDC_ADDFROMLANGEXT_BUTTON, 0) :
|
||||||
|
::SendMessage(_hSelf, WM_COMMAND, IDC_REMOVEEXT_BUTTON, 0);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (wParam)
|
switch (wParam)
|
||||||
{
|
{
|
||||||
case IDC_ADDFROMLANGEXT_BUTTON :
|
case IDC_ADDFROMLANGEXT_BUTTON :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user