// WinMsg.cmm - Display all Window messages for a standard window // #include "Window.lib" printf("This will create a default window and display all messages sent\n" "to that window. Press any key to execute..."); getch(); // Create a default window and let it run if ( MakeWindow(NULL,NULL,"WindowFunction", "Display Windows' messages", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, NULL,0) ) { while ( DoWindows() ) ; } WindowFunction(hwnd,msg,wparm,lparm,counter) { printf("\nMessage %d: hwnd = %04X, msg = %04X, wparm = %04X, lparm = %08X", counter++,hwnd,msg,wparm,lparm); }