mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-24 01:35:39 -05:00
WPF NotifyIcon
-------------- ADD Completed events. FIX Suppressing second left mouse click event in case of a double click. CHG General cleanup. git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@53 9f600761-6f11-4665-b6dc-0185e9171623
This commit is contained in:
@@ -35,13 +35,15 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
/// </summary>
|
||||
private WindowProcedureHandler messageHandler;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates the helper message window that is used
|
||||
/// to receive messages from the taskbar icon.
|
||||
/// </summary>
|
||||
private void CreateMessageWindow()
|
||||
{
|
||||
WindowId = "WPFTaskbarIcon_" + Guid.NewGuid().ToString();
|
||||
//generate a unique ID for the window
|
||||
WindowId = "WPFTaskbarIcon_" + DateTime.Now.Ticks;
|
||||
|
||||
//register window message handler
|
||||
messageHandler = OnWindowMessageReceived;
|
||||
@@ -86,14 +88,13 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
|
||||
{
|
||||
if (messageId == taskbarRestartMessageId)
|
||||
{
|
||||
//recreate the icon if the taskbar was restarted
|
||||
//TODO refresh icon
|
||||
//recreate the icon if the taskbar was restarted (e.g. due to Win Explorer shutdown)
|
||||
TaskbarCreated();
|
||||
}
|
||||
|
||||
//forward message
|
||||
ProcessWindowMessage(messageId, wparam, lparam);
|
||||
|
||||
//handle mouse clicks...
|
||||
|
||||
// Pass the message to the default window procedure
|
||||
return WinApi.DefWindowProc(hwnd, messageId, wparam, lparam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user