Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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дµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸е쬻î»î»î£¡
         &n ......

C++ÓëC½øÐÐÏ໥º¯Êýµ÷Óã¬extern¹Ø¼ü´ÊµÄÃîÓÃ

   extern³ýÁËÄܹ»ÓÃÓÚÉùÃ÷±äÁ¿£¬ÒѾ­ÔÚÍⲿ±»¶¨Ò壬²»ÓÃÖØÐ¶¨ÒåºÍ·ÖÅäÄÚ´æ¿Õ¼ä£¬»¹¿ÉÒÔÔÚC++ÓëC½øÐÐÏ໥º¯Êýµ÷Ó÷½Ãæ»áÓкܴóµÄÓô¦¡£
   Ê×ÏÈ£¬ÎÒÃÇÀ´¿´Ò»Ï£¬ÎªÊ²Ã´C++ºÍCÓïÑÔ²»ÄÜÏ໥½øÐк¯Êýµ÷Óãº
   ±àдÈçϵÄÔ´Îļþ£º
   int func(int i)
{
return 1;
}
&nbs ......

¿¼²éǶÈëʽC¿ª·¢ÈËÔ±×îºÃµÄÊ®µÀÌâ²Î¿¼´ð°¸

Ïêϸ²Î¿¼´ð°¸
µÚ1Ìâ:   (b)
volatile×ÖÃæÒâ˼ÊÇÒ×ÓÚ»Ó·¢µÄ¡£Õâ¸ö¹Ø¼ü×ÖÀ´ÃèÊöÒ»¸ö±äÁ¿Ê±£¬Òâζ×Å ¸ø¸Ã±äÁ¿¸³Öµ(дÈë)Ö®ºó£¬ÂíÉÏÔÙ¶ÁÈ¡£¬Ð´ÈëµÄÖµÓë¶ÁÈ¡µÄÖµ¿ÉÄܲ»Ò»Ñù,ËùÒÔ˵Ëü"ÈÝÒ×»Ó·¢"µÄ¡£
ÕâÊÇÒòΪÕâ¸ö±äÁ¿¿ÉÄÜÒ»¸ö¼Ä´æÆ÷£¬Ö±½ÓÓëÍⲿÉ豸ÏàÁ¬£¬ÄãдÈëÖ®ºó£¬¸Ã¼Ä´æÆ÷Ò²ÓпÉÄܱ»ÍⲿÉ豸µÄд²Ù×÷Ëù¸Ä±ä;»òÕ ......

C£¬C++ÍøÂç±à³Ìѧϰ¼òÃ÷

C£¬C++ÍøÂç±à³Ìѧϰ¼òÃ÷Ö¸ÄÏ
1. ÔúʵµÄC£¬C++»ù´¡ÖªÊ¶
²Î¿¼×ÊÁÏ¡¶C³ÌÐòÉè¼Æ¡·£¬¡¶C++ primer¡·¡£
2. TCP/IPЭÒé
¾­µäÊéÊÇ£ºW.Richard Stevens Öø¡¶TCP/IPÏê½â¡·Èý¾íÊ飬¾í1ÊÇЭÒ飬¾í2ÊÇʵÏÖ£¬¾í3ÊÇTCPÊÂÎñЭÒéµÈ¡£»¹Óйٷ½µÄЭÒéÎĵµ£ºRFC
µ±È»Ò²¿ÉÒÔÔÚÍøÉÏÏÂÔØµç×ÓÊé¡£
¾­µäµÄ¿ªÔ´Ð­Òé·ÖÎö¹¤¾ß£ºWireshark. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ