[DllImport("user32.dll")]
private extern static IntPtr SendMessage(IntPtr handle, uint message, uint param, uint sount_mute);
问题来了:请问其中的五个参数都代表什么意思,请详细解答
参考
http://msdn.microsoft.com/zh-cn/magazine/ms646275(en-us,VS.85).aspx
APPCOMMAND_VOLUME_DOWN 减少音量
9
Lower the volume.
APPCOMMAND_VOLUME_MUTE 静音
8
Mute the volume.
APPCOMMAND_VOLUME_UP 增加
10
Raise the volume.
IntPtr handle
是窗口句柄
uint message传递我刚才说的WM_APPCOMMAND
wParam
A handle to the window where the user clicked the button or pressed the key. This can be a child window of the window receiving the message. For more information about processing this message, see the Remarks section.
lParam
Use the following code to get the information contained in the lParam parameter.参照我之前给的3个常量之一。
例子
http://blog.163.com/fengchaotian_007/blog/static/66572109201152263615209/