home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource1
/
cenvew
/
winmsg.cmm
< prev
next >
Wrap
Text File
|
1993-11-15
|
776b
|
27 lines
// 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);
}