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


1 // WindowProc --- Handles messages for the main application window
2 static long FAR PASCAL WindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
3 {
4 PAINTSTRUCT ps;
5 HDC hdc;
6 static BOOL fFirstPaint = TRUE;
7 switch( message )
8 {
9 case WM_KEYDOWN: //Check for key presses
10 switch( wParam )
11 {
12 case VK_UP:
13 UpdateFrame("UP");
14 break;
15 case VK_DOWN:
16 UpdateFrame("DOWN");
17 break;
18 case VK_LEFT:
19 UpdateFrame("LEFT");
20 break;
21 case VK_RIGHT:
22 UpdateFrame("RIGHT");
23 break;
24 case VK_ESCAPE:
25 case VK_F12:
26 PostMessage(hWnd, WM_CLOSE, 0, 0);
27 return 0;
28 }
29 break;
30 case WM_PAINT:
31 hdc = BeginPaint( hWnd, &ps );
32 EndPaint( hWnd, &ps );
33 return 1;
34 case WM_DESTROY:
35 // We're done, clean up
36 CleanUp();
37 break;
38 }
39 return DefWindowProc(hWnd, message, wParam, lParam);
40 }
41 The message processing function - WindowProc()

in Table To:


© 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