LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg,
UINT wParam, LONG lParam );
-wxChar *wxTaskBarWindowClass = wxT("wxTaskBarWindowClass");
+wxChar *wxTaskBarWindowClass = (wxChar*) wxT("wxTaskBarWindowClass");
wxList wxTaskBarIcon::sm_taskBarIcons;
bool wxTaskBarIcon::sm_registeredClass = FALSE;
notifyData.hWnd = (HWND) m_hWnd;
notifyData.uCallbackMessage = sm_taskbarMsg;
notifyData.uFlags = NIF_MESSAGE ;
- if (icon.Ok())
+ if (icon.Ok())
{
- notifyData.uFlags |= NIF_ICON;
- notifyData.hIcon = (HICON) icon.GetHICON();
+ notifyData.uFlags |= NIF_ICON;
+ notifyData.hIcon = (HICON) icon.GetHICON();
}
if (((const wxChar*) tooltip != NULL) && (tooltip != wxT("")))
menu->UpdateUI();
+ // Work around a WIN32 bug
+ ::SetForegroundWindow ((HWND) win->GetHWND ());
+
rval = win->PopupMenu(menu, 0, 0);
+ // Work around a WIN32 bug
+ ::PostMessage ((HWND) win->GetHWND(),WM_NULL,0,0L);
+
win->PopEventHandler(FALSE);
win->Destroy();
delete win;
}
if (eventType) {
- wxEvent event;
- event.SetEventType(eventType);
- event.SetEventObject(this);
+ wxTaskBarIconEvent event(eventType, this);
ProcessEvent(event);
}