Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: WNDLIST.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 9/28/1999
  12. *
  13. * DESCRIPTION: List of windows. Lets us broadcast a message to all of the windows
  14. * in the list at one time.
  15. *
  16. *******************************************************************************/
  17. #ifndef __WNDLIST_H_INCLUDED
  18. #define __WNDLIST_H_INCLUDED
  19. class CWindowList : public CSimpleLinkedList<HWND>
  20. {
  21. private:
  22. // No implementation
  23. CWindowList( const CWindowList & );
  24. CWindowList &operator=( const CWindowList & );
  25. public:
  26. CWindowList(void)
  27. {
  28. }
  29. void Add( HWND hWnd )
  30. {
  31. Prepend(hWnd);
  32. }
  33. void PostMessage( UINT uMsg, WPARAM wParam, LPARAM lParam )
  34. {
  35. for (Iterator i=Begin();i != End();++i)
  36. {
  37. ::PostMessage( *i, uMsg, wParam, lParam );
  38. }
  39. }
  40. void SendMessage( UINT uMsg, WPARAM wParam, LPARAM lParam )
  41. {
  42. for (Iterator i=Begin();i != End();++i)
  43. {
  44. ::SendMessage( *i, uMsg, wParam, lParam );
  45. }
  46. }
  47. };
  48. #endif // __WNDLIST_H_INCLUDED