-bool wxTaskBarIcon::RegisterWindowClass()
-{
- if (sm_registeredClass)
- return true;
-
- // Also register the taskbar message here
- sm_taskbarMsg = ::RegisterWindowMessage(wxT("wxTaskBarIconMessage"));
-
- WNDCLASS wc;
- bool rc;
-
- HINSTANCE hInstance = GetModuleHandle(NULL);
-
- /*
- * set up and register window class
- */
- wc.style = CS_HREDRAW | CS_VREDRAW;
- wc.lpfnWndProc = (WNDPROC) wxTaskBarIconWindowProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
- wc.hIcon = 0;
- wc.hCursor = 0;
- wc.hbrBackground = 0;
- wc.lpszMenuName = NULL;
- wc.lpszClassName = wxTaskBarWindowClass ;
- rc = (::RegisterClass( &wc ) != 0);
-
- sm_registeredClass = (rc != 0);
-
- return( (rc != 0) );
-}
-
-WXHWND wxTaskBarIcon::CreateTaskBarWindow()
-{
- HINSTANCE hInstance = GetModuleHandle(NULL);
-
- HWND hWnd = CreateWindowEx (0, wxTaskBarWindowClass,
- wxT("wxTaskBarWindow"),
- WS_OVERLAPPED,
- 0,
- 0,
- 10,
- 10,
- NULL,
- (HMENU) 0,
- hInstance,
- NULL);
-
- return (WXHWND) hWnd;
-}
-
-long wxTaskBarIcon::WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam )
-{
- wxEventType eventType = 0;
-
- if (msg != sm_taskbarMsg)
- return DefWindowProc((HWND) hWnd, msg, wParam, lParam);