#include <Windows.h> #include <math.h> #include "resource.h" #define PI 3.1415976/180 int dwCenterX,dwCenterY,dwRadius; const TCHAR *szAppName=TEXT("Clock"); LRESULT CALLBACK ProcWinMain(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); void ShowTime(HWND hwnd,HDC hdc); void CalcClockParam(HWND hwnd); void DrawDot(HDC hdc,int dwDegreeInc,int dwSmallRadius); int CalX(double dwNowDegreen,int dwR); int CalY(double dwNowDegreen,int dwR); void DrawLine(HDC hdc,double dwDegreen,int dwRadiusAdjust); int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd ) { WNDCLASS wc; MSG msg; HWND hwnd; RtlZeroMemory(&wc,sizeof(WNDCLASS)); wc.cbClsExtra=0; wc.cbWndExtra=0; wc.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH); wc.hCursor=LoadCursor(hInstance,IDC_ARROW); wc.hIcon=LoadIcon(hInstance,MAKEINTRESOURCE(ICO_MAIN)); wc.hInstance=hInstan