home *** CD-ROM | disk | FTP | other *** search
- /*
- BCSTMSG.C -- Demontrates BroadCastMessage
-
- From Chapter 6 of "Undocumented Windows" (Addison-Wesley 1992)
- by Andrew Schulman, Dave Maxey and Matt Pietrek
-
- Build using: WINIOBC BCSTMSG (for Borland C++ v3.00)
- WINIOMS BCSTMSG (for Microsoft C/SDK)
- */
-
- #include <windows.h>
- #include "winio.h"
-
- /* undocumented function */
- extern void FAR PASCAL BroadcastMessage(HWND hwnd, WORD wMsg,
- WORD wParam, DWORD lParam);
- #include "checkord.c"
-
-
- int main()
- {
- // Ord/name check
- if (! CheckOrdName("BroadcastMessage", "USER", 355))
- return 0;
-
- winio_about("BCSTMSG"
- "\nUses BroadCastMessage to minimize all windows"
- "\n\nFrom Chapter 6 of"
- "\n\"Undocumented Windows\" (Addison-Wesley, 1992)"
- "\nby Andrew Schulman, David Maxey and Matt Pietrek"
- );
- puts("Press a key to minimize all windows on the desktop");
-
- getchar();
-
- BroadcastMessage(winio_current(), WM_SYSCOMMAND, SC_ICON, NULL);
-
- return 0;
- }
-