OnMessage returns lparam

import/tags/kmeleon03
binaryc 22 years ago
parent 0d56b9777f
commit 322ad4e788
  1. 1
      k-meleon/kmeleon_winamp/StdAfx.h
  2. 6
      k-meleon/kmeleon_winamp/kmeleon_winamp.cpp

@ -10,7 +10,6 @@
#pragma once
#endif // _MSC_VER > 1000
// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers

@ -47,7 +47,7 @@ void Quit();
HGLOBAL GetMenu();
void DoMenu(HMENU menu, char *param);
void DoRebar(HWND rebarWnd);
void OnMessage(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam);
LPARAM OnMessage(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam);
kmeleonPlugin kPlugin = {
KMEL_PLUGIN_VER,
@ -170,14 +170,16 @@ void DoRebar(HWND rebarWnd){
SendMessage(rebarWnd, RB_MAXIMIZEBAND, (WPARAM)bandPos, (LPARAM)true);
}
void OnMessage(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam){
LPARAM OnMessage(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam){
if (message == WM_COMMAND){
WORD command = LOWORD(wParam);
if (command >= commandIDs && command < (commandIDs + numCommands)){
HWND hwndWinamp = FindWindow("Winamp v1.x",NULL);
SendMessage(hwndWinamp, WM_COMMAND, commandTable[command - commandIDs], 0);
return true;
}
}
return false;
}
// so it doesn't munge the function name

Loading…
Cancel
Save