Windows编程 - 正弦曲线
#include < windows.h > #include < math.h > LRESULT __stdcall WndProc(HWND, UINT, WPARAM, LPARAM); int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { char szWindowClass[] = " SineWave " ; // 注册窗口类 WNDCLASSEX wcex; wcex.cbSize = sizeof (WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0 ; wcex.cbWndExtra = 0 ; wcex.hInstance = hInstance; wcex.hIcon = NULL; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)::GetStockObject(WHITE_BRUSH); wcex.lpszMenuName =