reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 98f4b828764cace282f443f7ff9fe94d60885f36
parent 7b47f34f508f3b83d3f90781d1acdbf098ded139
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Wed, 20 Jan 2016 19:14:55 -0500

refactor win32's WM_COMMAND message handling

Diffstat:
Msrc/dialog.cpp | 4++--
Msrc/dialog.hpp | 2+-
Msrc/manager.cpp | 4++--
Msrc/manager.hpp | 2+-
Msrc/progress.cpp | 4++--
Msrc/progress.hpp | 2+-
Msrc/report.cpp | 4++--
Msrc/report.hpp | 2+-
8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/dialog.cpp b/src/dialog.cpp @@ -60,7 +60,7 @@ WDL_DLGRET Dialog::Proc(HWND handle, UINT msg, WPARAM wParam, LPARAM lParam) dlg->onTimer(); break; case WM_COMMAND: - dlg->onCommand(wParam, lParam); + dlg->onCommand(LOWORD(wParam)); break; case WM_NOTIFY: dlg->onNotify((LPNMHDR)lParam, lParam); @@ -181,7 +181,7 @@ void Dialog::onTimer() { } -void Dialog::onCommand(WPARAM, LPARAM) +void Dialog::onCommand(int) { } diff --git a/src/dialog.hpp b/src/dialog.hpp @@ -83,7 +83,7 @@ protected: virtual void onShow(); virtual void onHide(); virtual void onTimer(); - virtual void onCommand(WPARAM, LPARAM); + virtual void onCommand(int); virtual void onNotify(LPNMHDR, LPARAM); virtual void onContextMenu(HWND, int x, int y); virtual void onDestroy(); diff --git a/src/manager.cpp b/src/manager.cpp @@ -56,9 +56,9 @@ void Manager::onInit() }, getItem(IDC_LIST)); } -void Manager::onCommand(WPARAM wParam, LPARAM) +void Manager::onCommand(const int id) { - switch(LOWORD(wParam)) { + switch(id) { case IDC_IMPORT: m_reapack->importRemote(); break; diff --git a/src/manager.hpp b/src/manager.hpp @@ -37,7 +37,7 @@ public: protected: void onInit() override; - void onCommand(WPARAM, LPARAM) override; + void onCommand(int) override; void onNotify(LPNMHDR, LPARAM) override; void onContextMenu(HWND, int x, int y) override; diff --git a/src/progress.cpp b/src/progress.cpp @@ -55,9 +55,9 @@ void Progress::onInit() m_progress = GetDlgItem(handle(), IDC_PROGRESS); } -void Progress::onCommand(WPARAM wParam, LPARAM) +void Progress::onCommand(const int id) { - switch(LOWORD(wParam)) { + switch(id) { case IDCANCEL: if(m_transaction) m_transaction->cancel(); diff --git a/src/progress.hpp b/src/progress.hpp @@ -33,7 +33,7 @@ public: protected: void onInit() override; - void onCommand(WPARAM, LPARAM) override; + void onCommand(int) override; private: void addDownload(Download *); diff --git a/src/report.cpp b/src/report.cpp @@ -68,9 +68,9 @@ void Report::onInit() SetDlgItemText(handle(), IDC_REPORT, str.c_str()); } -void Report::onCommand(WPARAM wParam, LPARAM) +void Report::onCommand(const int id) { - switch(LOWORD(wParam)) { + switch(id) { case IDOK: case IDCANCEL: close(); diff --git a/src/report.hpp b/src/report.hpp @@ -30,7 +30,7 @@ public: protected: void onInit() override; - void onCommand(WPARAM, LPARAM) override; + void onCommand(int) override; private: void printNewPackages();