Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¶win32»ã±à¡·Ê±ÖÓÖ®C´úÂë

#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=hInstance;
wc.lpfnWndProc=ProcWinMain;
wc.lpszClassName=szAppName;
wc.lpszMenuName=NULL;
wc.style=0;

if(!RegisterClass(&wc))
{
MessageBox(NULL,TEXT("It's required for Windows NT!"),szAppName,MB_ICONERROR);
return 0;
}
hwnd=CreateWindowEx(WS_EX_CLIENTEDGE,
szAppName,szAppName,WS_OVERLAPPEDWINDOW,
100,100,250,270,
NULL,NULL,hInstance,NULL
);
ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd);
while (GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
LRESULT CALLBACK ProcWinMain(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_TIMER:
InvalidateRect(hwnd,NULL,TRUE);
return 0;
case WM_PAINT:
hdc=BeginPaint(hwnd,&ps);
ShowTime(hwnd,hdc);
EndPaint(hwnd,&ps);
return 0;
case WM_CREATE:
SetTimer(hwnd,ID_TIMER,1000,NULL);
return 0;
case WM_CLOSE:
KillTimer(hwnd,ID_TIMER);
DestroyWindow(hwnd);
PostQuitMessage(0);
retur


Ïà¹ØÎĵµ£º

CÓëC++Óï·¨µÄ²»Í¬µã

LinuxÏÂͨ³£Ê¹ÓÃÃâ·ÑµÄ±àÒëÆ÷gcc¡£ÆäÖÐgccÖ÷ÒªÓÃÀ´±àÒëCÓïÑÔ´úÂ룬g++Ö÷ÒªÓÃÀ´±àÒëC++´úÂë¡£Èç¹ûÏëÓÃgcc±àÒëc³ÌÐò£¬ÔòҪעÒâCÓëC++¶ÔÓï·¨ÒªÇóµÄ²»Í¬µã£¬ÀýÈ磺
1) C³ÌÐòÊÇ´Ómainº¯Êý¿ªÊ¼£¬C++³ÌÐòÊÇ´ÓÈ«¾Ö±äÁ¿µÄ¹¹Ô캯Êý¿ªÊ¼
2) ±äÁ¿±ØÐëÉùÃ÷ÔÚÓï¾äÇ°
3) Ã»ÓÐboolÀàÐÍ
4) ÉùÃ÷ö¾Ù±äÁ¿ÊDZØÐëÔÚö¾Ù ......

C/S½á¹¹Web»¯£¬ÆƳýERP·Ö²¼Ä£Ê½Æ¿¾±

2009Ä꣬¾­¼ÃΣ»úÁýÕÖϵÄÖйú¹ÜÀíÈí¼þÐÐÒµ£¬ÓëÍùÄêÏà±È¾²Ä¬ÁËÐí¶à¡£²»¾ÃÇ°£¬SAPÖйúÑо¿Ôº×ܲÃÜÇÏé÷ëÅúÆÀ¹ú²úÈí¼þ¼¼Êõ»¹Í£ÁôÔÚ10ÄêÇ°¿Í»§¶Ë(Clien/Server)¼Ü¹¹Ë®Æ½£¬Òý·¢Òµ½çÒ»³¡´óÂÛÕ½¡£ÄÇôÖйú¹ÜÀíÈí¼þ¼¼ÊõÊÇ·ñÕæµÄÒѾ­Âäºó?
¡¡¡¡C/SÓ¦ÓÃÈÔÓÐÓÅÊÆ
¡¡¡¡ÄÇôÖйú¹ÜÀíÈí¼þ¼¼ÊõÊÇ·ñÒѾ­Âäºó?
¡¡¡¡C/S½á¹¹³ÌÐòÓëB/S(Web) ......

Linux ²Ù×÷ϵͳ C ÓïÑÔ±à³ÌÈëÃÅ

Linux ²Ù×÷ϵͳ C ÓïÑÔ±à³ÌÈëÃÅ

Ŀ ¼
µÚÒ»Õ »ù´¡ÖªÊ¶ ……………………………………………………………4
µÚ¶þÕÂ ......

¡¾C\C++ÓïÑÔÈëÃÅƪ¡¿ »ù±¾Êý¾ÝÀàÐÍ

ǰһƪÎÒÃǽéÉÜÁËÒ»¸ö¼òµ¥²»¹ýµÄhelloworld³ÌÐòÒý³öÏà¹ØÎÊÌâ¡£³Ã×Å»¹Ã»ÓÐÍüµôÄÇЩ˼¿¼·½Ê½µÄ¼ÇÒ䣬±¾Æª¼ÌÐøÑÓÐøÕâÖÖ˼ά·½Ê½µÄÀíÄ½éÉÜÒ»ÏÂCC++ÖеĻù±¾Êý¾ÝÀàÐÍ¡£Êý¾ÝÀàÐͲ»Çå³þµÄ»°ÔÚÒÔºóµÄ±à³ÌÖлáÓкܶàÃÕÍźÍÎÊÌâ¡£ÉõÖÁÒ»¸ö³ÌÐòµÄBUGÕÒ°ëÌìҲûÓÐÕÒ³öÀ´Ê±ÎªÊ²Ã´£¬½á¹û²Å·¢ÏÖÊǼӼõÒç³öÁË¡£¸ü¼ÓÑÏÖصĻ¹ÓÐдԽ½ç¡¢¶ÁÔ ......

linux c mkdir´´½¨µÝ¹éĿ¼

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define err(msg) perror(msg)
static void mkdirs(const char *dir)
{
        char tmp[1024];
        char *p;
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ