/*--------------------------------------------------- sinwave.h --- sinwave, (c) jiyun.xia 2011 ---------------------------------------------------*/ #ifndef SINWAVE_H_ #define SINWAVE_H_ #include <windows.h> LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); #endif /*----------------------------------------------- sinwave.cpp --- draw sine. ------------------------------------------------*/ #include "sinwave.h" #include <math.h> #include <time.h> #define ID_TIME1 1 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR szCmdLine, int iCmdShow) { static TCHAR szAppName[] = TEXT("sinwave"); HWND hWnd; MSG msg; WNDCLASS wndClass; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; wndClass.hbrBackground = (HBRUSH)::GetStockObject(BLACK_BRUSH); wndCla