足球比分直播

一个简单的闹钟程序.doc

返回
一个简单的闹钟程序.doc_第1页
第1页 / 共7页
一个简单的闹钟程序.doc_第2页
第2页 / 共7页
一个简单的闹钟程序.doc_第3页
第3页 / 共7页
一个简单的闹钟程序.doc_第4页
第4页 / 共7页
一个简单的闹钟程序.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述:
头文件// stdafx.h include file for standard system include files,// or project specific include files that are used frequently, but// are changed infrequently//if definedAFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_if _MSC_VER 1000pragma onceendif // _MSC_VER 1000define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headersinclude // TODO reference additional headers your program requires here//{{AFX_INSERT_LOCATION}}// Microsoft Visual C will insert additional declarations immediately before the previous line.endif // definedAFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_源文件include “stdafx.h“include “mmsystem.h“POINT dy[60]{200,18,218,20,234,22,252,28,270,34,288,42,304,51,318,62,334,78,344,90,356,108,362,120,368,135,373,152,378,175,380,200,379,221,375,242,370,260,364,276,356,289,346,306,336,318,320,334,306,345,290,356,272,366,254,373,236,377,220,379,200,380,182,379,166,377,148,373,130,366,112,358,96,347,82,336,66,320,54,306,44,289,36,276,30,260,23,240,21,219,20,200,21,177,24,158,29,141,35,126,44,112,54,94,66,80,80,66,96,53,110,44,130,33,146,27,164,22,180,20};POINT zy[60]{200,39,216,40,231,42,247,46,263,52,279,60,293,69,305,78,319,92,329,102,339,118,345,128,350,143,355,157,360,178,360,200,359,218,357,239,352,252,346,268,342,280,332,294,321,306,309,319,295,331,280,340,263,348,248,353,232,357,218,359,200,360,184,360,170,359,154,355,138,348,123,341,110,332,96,323,82,307,71,296,61,282,55,269,48,254,42,236,40,218,40,200,41,180,45,162,49,148,53,136,58,122,68,106,78,93,91,81,106,70,120,60,136,52,152,46,168,42,182,40};POINT xy[60]{200,60,214,61,227,63,241,66,253,70,268,77,280,84,292,94,304,106,312,116,320,128,324,138,330,148,334,160,338,178,340,200,339,214,336,232,332,246,326,259,320,270,314,282,306,290,294,304,284,312,270,322,254,330,242,334,228,338,216,340,200,340,186,340,174,338,160,334,146,330,132,324,120,316,110,308,96,294,86,284,78,272,72,260,68,248,62,232,60,216,60,200,61,182,62,167,66,154,72,142,78,130,86,118,94,106,104,96,116,86,128,78,144,70,158,64,170,62,182,60}; static SYSTEMTIME sys;void fenzhengHDC hdc;void shizhengHDC hdc;void miaozhengHDC hdc;void huakjHDC hdc;void shuziHDC hdc;void CALLBACK timerHWND hwnd,UINT message,UINT timerid,DWORD timer;void CALLBACK yidongHWND hwnd,UINT message,UINT timerid,DWORD timer;LRESULT CALLBACK wndprocHWND hwnd,UINT message,WPARAM wParam,LPARAM lParam;int APIENTRY WinMainHINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR szLine,int iShow{// TODO Place code here.HWND hwnd;MSG msg;static TCHAR szappname[]TEXT“聊天工具“;WNDCLASS wndclass;wndclass.cbClsExtra0;wndclass.cbWndExtra0;wndclass.styleCS_VREDRAW|CS_HREDRAW;wndclass.lpfnWndProcwndproc;wndclass.hInstancehInstance;wndclass.hIconLoadIconNULL,IDI_APPLICATION;wndclass.hCursorLoadCursorNULL,IDC_ARROW;wndclass.hbrBackgroundHBRUSHGetStockObjectBLACK_BRUSH;wndclass.lpszClassNameszappname;wndclass.lpszMenuNameNULL;RegisterClasshwndCreateWindowszappname,TEXT“闹钟加时间表“,WS_OVERLAPPEDWINDOW,500,100,400,500,NULL,NULL,hInstance,NULL;ShowWindowhwnd,iShow;UpdateWindowhwnd;whileGetMessageDispatchMessage}return msg.wParam;}LRESULT CALLBACK wndprocHWND hwnd,UINT message,WPARAM wParam,LPARAM lParam{HWND hwndedit,hwndstatic;static HINSTANCE hInstance;HDC hdc;PAINTSTRUCT ps;switchmessage{case WM_CREATE{hwndstaticCreateWindowTEXT“STATIC“,TEXT“北京时间“,WS_CHILD|WS_VISIBLE,100,400,160,20,hwnd,HMENU1,hInstance,NULL;hwndeditCreateWindowTEXT“EDIT“,TEXT““,WS_CHILD|WS_VISIBLE|ES_READONLY,190,400,140,20,hwnd,HMENU2,hInstance,NULL;SetTimerhwnd,0,1000,timer;SetTimerhwnd,1,1000,yidong;return 0;}case WM_PAINT{hdcBeginPainthwnd,huakjhdc;EndPainthwnd,return 0;}case WM_DESTROY{PostQuitMessage0;return 0;}}return DefWindowProchwnd,message,wParam,lParam;}void huakjHDC hdc{HPEN hPen,hPen1;HBRUSH hBrush,hBrush1,hBrush2;hBrushCreateSolidBrushRGB0,0,255;hBrush1CreateSolidBrushRGB0,255,0;hBrush2CreateSolidBrushRGB255,0,0;hPenCreatePenPS_SOLID,0,RGB255,0,0;hPen1CreatePenPS_SOLID,0,RGB0,0,0;SelectObjecthdc,hBrush;SelectObjecthdc,hPen;Ellipsehdc,20,20,380,380;forint i0;i12{ji1;}ifsys.wMinute24{ji2;}ifsys.wMinute36{ji3;}ifsys.wMinute48{ji4;}MoveToExhdc,200,200,NULL;LineTohdc,xy[j].x,xy[j].y;}
展开阅读全文
收藏
下载资源

加入会员免费下载





足球比分直播