| ÍøÕ¾Ê×Ò³ | Òµ½çÐÂÎÅ | С×é | Íþ¿Í | È˲Š| ÏÂÔØƵµÀ | ²©¿Í | ´úÂëÌù | ÔÚÏß±à³Ì | ±à³ÌÂÛ̳
»¶Ó­¼ÓÈëÎÒÃÇ£¬Ò»Í¬Çд輼Êõ
Óû§Ãû£º   
 
ÃÜ¡¡Â룺  
¹²ÓÐ 539 È˹Ø×¢¹ý±¾Ìû
±êÌ⣺ΪʲôССµÄ³ÌÐòÔËÐÐÈ´³¬ÂýÄØ£¿£¿£¿
È¡ÏûÖ»¿´Â¥Ö÷ ¼ÓÈëÊÕ²Ø
haiboself
Rank: 3Rank: 3
µÈ¡¡¼¶£ºÂÛ̳ÓÎÏÀ
Ìû¡¡×Ó£º193
ר¼Ò·Ö£º196
×¢¡¡²á£º2013-10-23
½áÌûÂÊ£º100%
ÊÕ²Ø
ÒѽáÌù¡Ì  ÎÊÌâµãÊý£º20 »Ø¸´´ÎÊý£º2 
ΪʲôССµÄ³ÌÐòÔËÐÐÈ´³¬ÂýÄØ£¿£¿£¿
////////////////////////////
//Èý½ÇÐλ­°å£¬¿ÉÑ¡ÈýÖÖÑÕÉ«
//»­ÍêÈý½ÇºóµãÑÕÉ«¿ÉÒÔ»»Ìî³äÉ«
/////////////////////////////
#include<stdio.h>
#include<conio.h>
#include<graphics.h>

int main(void)

{
    initgraph(300,480);
    setbkcolor(WHITE);
    cleardevice();//ÉèÖñ³¾°
   
    //»æÖÆÑ¡É«Çø
    setfillcolor(RED);
    fillrectangle(0,450,100,480);
    setfillcolor(YELLOW);
    fillrectangle(100,450,200,480);
    setfillcolor(BLUE);
    fillrectangle(200,450,300,480);
   
    MOUSEMSG o;
       int color;
    char yanse;

    while(!kbhit())
    {
        while(!MouseHit())
        {
            if(true)
            {
                //µã»÷Êó±êÑ¡ÔñÑÕÉ«
                o=GetMouseMsg();
                if(o.uMsg==WM_LBUTTONDOWN)
                {
                    if((o.x>=0&&o.x<=100)&&(o.y>=450&&o.y<=480)) yanse='R';
                    else if((o.x>=100&&o.x<=200)&&(o.y>=450&&o.y<=480)) yanse='Y';
                    else if((o.x>=200&&o.x<=300)&&(o.y>=450&&o.y<=480)) yanse='B';
                    else 0;
                    
                    switch(yanse)
                    {
                    case'R': color=RED;  break;
                    case'Y': color=YELLOW;  break;
                    case'B': color=BLUE;  break;
                    default: 0;
                    }
                    setfillcolor(color);//
                }
            }
        }
        fillcircle(10,10,10);//µ±Ç°ÑÕÉ«±êʾ·û

        //»æÖÆÈý½ÇÐÎ
        POINT p[3];
        int i;
        MOUSEMSG m;
        for(i=0;i<3;)
        {
            if(true)
                m=GetMouseMsg();
            if(m.uMsg==WM_LBUTTONDOWN)
            {
                p[i].x = m.x;
                p[i].y = m.y;
                i++;
            }
            
        }
        solidpolygon(p,3);        
    }
   
    return 0;
    getch();
    closegraph();
}
ËÑË÷¸ü¶àÏà¹ØÖ÷ÌâµÄÌû×Ó: include¡¡Èý½ÇÐΡ¡
2013-11-20 22:59
haiboself
Rank: 3Rank: 3
µÈ¡¡¼¶£ºÂÛ̳ÓÎÏÀ
Ìû¡¡×Ó£º193
ר¼Ò·Ö£º196
×¢¡¡²á£º2013-10-23
ÊÕ²Ø
µÃ·Ö:0 
Êó±êµãºÃ¼¸´Î£¬¸ôºÃ³¤Ê±¼ä²ÅÆð×÷ÓÃ
2013-11-20 23:02
haiboself
Rank: 3Rank: 3
µÈ¡¡¼¶£ºÂÛ̳ÓÎÏÀ
Ìû¡¡×Ó£º193
ר¼Ò·Ö£º196
×¢¡¡²á£º2013-10-23
ÊÕ²Ø
µÃ·Ö:0 
»Ø¸´ 3Â¥ ƮҶcsc
.
2013-11-20 23:10
¿ìËٻظ´£ºÎªÊ²Ã´Ð¡Ð¡µÄ³ÌÐòÔËÐÐÈ´³¬ÂýÄØ£¿£¿£¿
Êý¾Ý¼ÓÔØÖÐ...
 
¡¡¡¡¡¡



¹ØÓÚÎÒÃÇ | ¹ã¸æºÏ×÷ | ±à³ÌÖйú | Çå³ýCookies | TOP | ÊÖ»ú°æ

±à³ÌÖйú °æȨËùÓУ¬²¢±£ÁôËùÓÐȨÀû¡£
Powered by Discuz, Processed in 0.033942 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved