@ -370,7 +370,7 @@ intptr_t CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
{
switch ( Message )
{
case WM_INITDIALOG :
case WM_INITDIALOG :
{
NppDarkMode : : autoSubclassAndThemeChildControls ( _hSelf ) ;
@ -401,26 +401,18 @@ intptr_t CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
updateConflictState ( ) ;
NativeLangSpeaker * nativeLangSpeaker = NppParameters : : getInstance ( ) . getNativeLangSpeaker ( ) ;
nativeLangSpeaker - > changeDlgLang ( _hSelf , " ShortcutMapperSubDialg " ) ;
goToCenter ( ) ;
goToCenter ( SWP_SHOWWINDOW | SWP_NOSIZE ) ;
return TRUE ;
}
case WM_CTLCOLOREDIT :
{
if ( NppDarkMode : : isEnabled ( ) )
{
return NppDarkMode : : onCtlColorSofter ( reinterpret_cast < HDC > ( wParam ) ) ;
}
break ;
return NppDarkMode : : onCtlColorSofter ( reinterpret_cast < HDC > ( wParam ) ) ;
}
case WM_CTLCOLORLISTBOX :
{
if ( NppDarkMode : : isEnabled ( ) )
{
return NppDarkMode : : onCtlColor ( reinterpret_cast < HDC > ( wParam ) ) ;
}
break ;
return NppDarkMode : : onCtlColor ( reinterpret_cast < HDC > ( wParam ) ) ;
}
case WM_CTLCOLORDLG :
@ -434,7 +426,6 @@ intptr_t CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
return NppDarkMode : : onCtlColor ( reinterpret_cast < HDC > ( wParam ) ) ;
}
return NppDarkMode : : onCtlColorDarker ( reinterpret_cast < HDC > ( wParam ) ) ;
}
break ;
}
@ -454,10 +445,18 @@ intptr_t CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
return TRUE ;
}
case WM_COMMAND :
case WM_DPICHANGED :
{
DPIManagerV2 : : setDpiWP ( wParam ) ;
setPositionDpi ( lParam ) ;
return TRUE ;
}
case WM_COMMAND :
{
auto textlen = : : SendDlgItemMessage ( _hSelf , IDC_NAME_EDIT , WM_GETTEXTLENGTH , 0 , 0 ) ;
switch ( wParam )
switch ( LOWORD( wParam) )
{
case IDC_CTRL_CHECK :
_keyCombo . _isCtrl = BST_CHECKED = = : : SendDlgItemMessage ( _hSelf , static_cast < int32_t > ( wParam ) , BM_GETCHECK , 0 , 0 ) ;
@ -915,7 +914,7 @@ void recordedMacroStep::PlayBack(Window* pNotepad, ScintillaEditView *pEditView)
| | ( _message = = SCI_INSERTTEXT )
| | ( _message = = SCI_APPENDTEXT ) )
{
SCNotification scnN ;
SCNotification scnN {} ;
scnN . nmhdr . code = SCN_CHARADDED ;
scnN . nmhdr . hwndFrom = pEditView - > getHSelf ( ) ;
scnN . nmhdr . idFrom = 0 ;
@ -1057,7 +1056,7 @@ intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPAR
switch ( Message )
{
case WM_INITDIALOG :
case WM_INITDIALOG :
{
NppDarkMode : : autoSubclassAndThemeChildControls ( _hSelf ) ;
@ -1083,26 +1082,18 @@ intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPAR
NativeLangSpeaker * nativeLangSpeaker = NppParameters : : getInstance ( ) . getNativeLangSpeaker ( ) ;
nativeLangSpeaker - > changeDlgLang ( _hSelf , " ShortcutMapperSubDialg " ) ;
goToCenter ( ) ;
goToCenter ( SWP_SHOWWINDOW | SWP_NOSIZE ) ;
return TRUE ;
}
case WM_CTLCOLOREDIT :
{
if ( NppDarkMode : : isEnabled ( ) )
{
return NppDarkMode : : onCtlColor ( reinterpret_cast < HDC > ( wParam ) ) ;
}
break ;
return NppDarkMode : : onCtlColor ( reinterpret_cast < HDC > ( wParam ) ) ;
}
case WM_CTLCOLORLISTBOX :
{
if ( NppDarkMode : : isEnabled ( ) )
{
return NppDarkMode : : onCtlColorListbox ( wParam , lParam ) ;
}
break ;
return NppDarkMode : : onCtlColorListbox ( wParam , lParam ) ;
}
case WM_CTLCOLORDLG :
@ -1135,9 +1126,17 @@ intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPAR
return TRUE ;
}
case WM_COMMAND :
case WM_DPICHANGED :
{
DPIManagerV2 : : setDpiWP ( wParam ) ;
setPositionDpi ( lParam ) ;
return TRUE ;
}
case WM_COMMAND :
{
switch ( wParam )
switch ( LOWORD( wParam) )
{
case IDC_CTRL_CHECK :
_keyCombo . _isCtrl = BST_CHECKED = = : : SendDlgItemMessage ( _hSelf , static_cast < int32_t > ( wParam ) , BM_GETCHECK , 0 , 0 ) ;
@ -1165,7 +1164,7 @@ intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPAR
: : EndDialog ( _hSelf , - 1 ) ;
return TRUE ;
case IDC_BUTTON_ADD :
case IDC_BUTTON_ADD :
{
size_t oldsize = _size ;
int res = addKeyCombo ( _keyCombo ) ;
@ -1209,7 +1208,7 @@ intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPAR
}
default :
if ( HIWORD ( wParam ) = = CBN_SELCHANGE | | HIWORD ( wParam ) = = LBN_SELCHANGE )
if ( HIWORD ( wParam ) = = CBN_SELCHANGE ) // LBN_SELCHANGE has same value 1
{
switch ( LOWORD ( wParam ) )
{