Basic HTML version of Foils prepared July 5 98

Foil 152 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. by Wojtek Furmanski, Subhash Nair, Tom Pulikal


// WindowProc --- Handles messages for the main application window
static long FAR PASCAL WindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
PAINTSTRUCT ps;
HDC hdc;
static BOOL fFirstPaint = TRUE;
switch( message )
{
case WM_KEYDOWN: //Check for key presses
switch( wParam )
{
case VK_UP:
UpdateFrame("UP");
break;
case VK_DOWN:
UpdateFrame("DOWN");
break;
case VK_LEFT:
UpdateFrame("LEFT");
break;
case VK_RIGHT:
UpdateFrame("RIGHT");
break;
case VK_ESCAPE:
case VK_F12:
PostMessage(hWnd, WM_CLOSE, 0, 0);
return 0;
}
break;
case WM_PAINT:
hdc = BeginPaint( hWnd, &ps );
EndPaint( hWnd, &ps );
return 1;
case WM_DESTROY:
// We're done, clean up
CleanUp();
break;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
The message processing function - WindowProc()



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998