mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-06 05:34:05 +02:00
Add a cue text to Sounds tab in Options
This commit is contained in:
parent
3e68026949
commit
a87bc4609e
Core
@ -4,6 +4,7 @@
|
||||
using System.Windows.Forms;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Notification;
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Other.Settings{
|
||||
sealed partial class TabSettingsSounds : BaseTabSettings{
|
||||
@ -23,6 +24,7 @@ public TabSettingsSounds(Action playSoundNotification){
|
||||
|
||||
tbCustomSound.Text = Config.NotificationSoundPath;
|
||||
tbCustomSound_TextChanged(tbCustomSound, EventArgs.Empty);
|
||||
NativeMethods.SendMessage(tbCustomSound.Handle, NativeMethods.EM_SETCUEBANNER, 0, "(default TweetDeck sound)");
|
||||
}
|
||||
|
||||
public override void OnReady(){
|
||||
|
@ -17,6 +17,7 @@ static class NativeMethods{
|
||||
public const int GWL_STYLE = -16;
|
||||
|
||||
public const int SB_HORZ = 0;
|
||||
public const int EM_SETCUEBANNER = 0x1501;
|
||||
|
||||
public const int WM_MOUSE_LL = 14;
|
||||
public const int WM_MOUSEWHEEL = 0x020A;
|
||||
@ -52,6 +53,9 @@ private struct MSLLHOOKSTRUCT{
|
||||
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
|
||||
private static extern bool SetWindowPos(int hWnd, int hWndOrder, int x, int y, int width, int height, uint flags);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SendMessage(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool PostMessage(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user