home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / CENVIW9.ZIP / WINMSG.CMM < prev    next >
Text File  |  1994-03-08  |  913b  |  29 lines

  1. //************************************************
  2. //*** WinMsg.cmm - Display all Window messages ***
  3. //*** ver.1        for a standard window       ***
  4. //************************************************
  5.  
  6. #include "Window.lib"
  7.  
  8. printf("This will create a default window and display all messages sent\n"
  9.        "to that window.  Press any key to execute...");
  10. getch();
  11.  
  12. // Create a default window and let it run
  13.    if ( MakeWindow(NULL,NULL,"WindowFunction",
  14.                    "Display Windows' messages",
  15.                    WS_OVERLAPPEDWINDOW | WS_VISIBLE,
  16.                    CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
  17.                    NULL,0) ) {
  18.  
  19.       while ( DoWindows() )
  20.          ;
  21.    }
  22.  
  23. WindowFunction(hwnd,msg,wparm,lparm,counter)
  24. {
  25.    printf("\nMessage %d: hwnd = %04X, msg = %04X, wparm = %04X, lparm = %08X",
  26.           counter++,hwnd,msg,wparm,lparm);
  27. }
  28.  
  29.