From 896d0ab695b981375cf77d066720a044aaac6e1a Mon Sep 17 00:00:00 2001 From: SinghRajenM Date: Fri, 30 Dec 2016 00:46:16 +0530 Subject: [PATCH] Fix toolbar not showing issue while launching Notepad++ from system tray Fixes #2600, closes #2729 --- PowerEditor/src/NppCommands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index b4ffd0319..94e842e99 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2886,6 +2886,9 @@ void Notepad_plus::command(int id) { NppGUI & nppGUI = const_cast((NppParameters::getInstance())->getNppGUI()); ::ShowWindow(_pPublicInterface->getHSelf(), nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); + + // Send sizing info to make window fit (specially to show tool bar. Fixed issue #2600) + ::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0); } break; @@ -2907,6 +2910,9 @@ void Notepad_plus::command(int id) { NppGUI & nppGUI = const_cast((NppParameters::getInstance())->getNppGUI()); ::ShowWindow(_pPublicInterface->getHSelf(), nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); + + // Send sizing info to make window fit (specially to show tool bar. Fixed issue #2600) + ::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0); fileOpen(); } break;