}
}
}
//-----------------------------------------------------------------------------------------CALLBACK WndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{(msg){WM_DESTROY:(0);0;_MSG(hwnd,WM_CREATE,OnCreate);_MSG(hwnd,WM_PAINT,OnPaint);_MSG(hwnd,WM_COMMAND,OnCommand);_MSG(hwnd,WM_GETMINMAXINFO,OnGetMinMaxInfo);_MSG(hwnd,WM_TIMER,OnTimer);_MSG(hwnd,WM_KEYDOWN,OnKeyDown);: return (DefWindowProc (hwnd, msg, wParam, lParam));
}
}
//-----------------------------------------------------------------------------------------CALLBACK WndStokProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
(msg) {WM_DESTROY: (0); 0 ;: return (DefWindowProc (hwnd, msg, wParam, lParam));
}
}
//-----------------------------------------------------------------------------------------WINAPI WinMain (HINSTANCE hInst, HINSTANCE, LPSTR, int)
//extern C void WinMainCRTStartup ()
{
//HINSTANCE hInst=GetModuleHandle(NULL);_hinstance=hInst;szClassName[]=TEXT(laquo;MainWindowsraquo;);szTitle[]=TEXT(laquo;Tetris Score: 0/3 lvl 0raquo;);Msg;wc;(amp;wc,sizeof(wc));.lpfnWndProc=WndProc;.style=CS_HREDRAW|CS_VREDRAW;.hInstance=hInst;.hIcon=LoadIcon(NULL,IDI_APPLICATION);.hCursor=LoadCursor(NULL,IDC_ARROW);.hbrBackground=(HBRUSH)CreateSolidBrush(RGB(0,0,0));.lpszClassName=szClassName;(amp;wc);.lpszClassName=TEXT(laquo;WndFigureraquo;);.lpfnWndProc=WndStokProc;(amp;wc);.lpszClassName=TEXT(laquo;WndStokraquo;);(amp;wc);_hwnd=CreateWindow(szClassName,szTitle,WS_OVERLAPPEDWINDOW,
, 0, SIZE_WINDOW_X, SIZE_WINDOW_Y, HWND_DESKTOP, NULL, hInst, NULL); _ hStok=CreateWindow (TEXT ( WndStok ), szTitle, WS_VISIBLE | WS_BORDER | WS_CHILD,
,20,300,600,g_hwnd,NULL,hInst,NULL);_hFigure=CreateWindow(TEXT(laquo;WndFigureraquo;),szTitle,WS_VISIBLE|WS_BORDER|WS_CHILD,_WINDOW_X- 120,30,100,100, g_hwnd, NULL, hInst, NULL); (g_hwnd, SW_SHOWNORMAL); (GetMessage ( amp; Msg, NULL, 0,0))
{( amp; Msg);
}
//ExitProcess (0); 0;
}
//-----------------------------------------------------------------------------------------