⑴ 用c語言ege製作菜單,求代碼
#include#include#include#includeusingnamespacestd;voidxuanzepaixu()//選擇排序函數{printf("待添加,請按任意鍵繼續");getchar();}voiderfenpaixu()//二分查找函數{printf("待添加,請按任意鍵繼續");getchar();}voidmenu()//主菜單{system("cls");//清屏printf("\n\t\t\t菜單\n");printf("\t\t\t#***********************#\n");printf("\t\t\t#1選擇排序#\n");printf("\t\t\t#2二分查找#\n");printf("\t\t\t#3返回#\n");printf("\t\t\t#4---關閉#\n");printf("\t\t\t#***********************#\n");printf("\t\t\t請選擇(1-4)=:");}voidmain(){charselect;while(1){menu();system("COLOR9f");scanf("%c",&select);if(select=='3')break;//返回上級菜單else{getchar();//讀入回車符if(!isdigit(select))//如果不是數字字元{printf("\n\7Yourselectmaybewrong,mustenterthedigit!\n");_getch();}else{switch(select){case'1':xuanzepaixu();break;case'2':erfenpaixu();break;case'4':exit(0);//直接退出default:{printf("\n\7\7Yourselecteddigitmaybewrong,selectagain!\n");_getch();break;}}}}}}
⑵ c語言ege輸入函數
ege僅有那一個輸入函數 inputbox_getline
⑶ 關於C語言的EGE字體問題
你把想要設置的字體放到winodws系統目錄下的字體庫就行了。
有哪些。。你打開word 字體格式選擇那塊就能看到了
⑷ C語言 用devc++編寫一個模擬時鍾,最簡單那種就行,但要能在devc++上運行。
#include<iostream>
#include<windows.h>
usingnamespacestd;
classClock{
public:
Clock(shorth=0,shortm=0,shorts=0):h(h),m(m),s(s){
}
voiddisplayTime();
private:
shorth;
shortm;
shorts;
};voidClock::displayTime(){
while(true){
cout<<h<<':'<<m<<':'<<s<<"";
Sleep(1000);//一秒更新一次
cout<<' ';
if(!(s=++s%60))
if(!(m=++m%60))
h=++h%24;
}
}intmain()
{
ClockA(12,20,30);//初始時間
A.displayTime();//更新函數
return0;
}
/*
12:20:30
*/
⑸ 如何使用ege做c程序中計算器界面
setbkcolor(WHITE);
setfillcolor(BLUE);
bar(50,20,400,400);
setfillcolor(WHITE);
bar(100,25,240,50);//復數 ai
bar(260,25,370,50);//復數b
bar(100,60,370,90);//其他運算結果框
setfillcolor(RED);
bar(100,100,154,160);//建造鍵盤框(二進制,八進制,十六進制是無效鍵!!!
bar(154,100,208,160);
bar(208,100,262,160);
bar(262,100,316,160);
bar(316,100,370,160);
bar(100,160,154,220);
bar(154,154,208,220);
bar(208,154,262,220);
bar(262,154,316,220);
bar(316,154,370,220);
bar(100,220,154,280);
bar(154,220,208,280);
bar(208,220,262,280);
bar(262,220,316,280);
bar(316,220,370,280);
bar(100,280,154,340);
bar(154,280,208,340);
bar(208,280,262,340);
bar(262,280,316,340);
bar(316,280,370,340);
bar(100,340,154,400);
bar(154,340,154,400);
bar(208,340,262,400);
bar(262,340,316,400);
bar(316,340,370,400);
bar(154,340,208,400);
setcolor(RED);
line(100,100,100,400);
line(100,100,370,100);
line(100,160,370,160);
line(100,220,370,220);
line(100,280,370,280);
line(100,340,370,340);
line(100,400,370,400);
line(100,60,370,60);
line(100,90,370,90);
line(100,60,100,90);
line(370,60,370,90);
line(156,100,156,400);
line(212,100,212,400);
line(268,100,268,400);
line(324,100,324,400);
line(370,100,370,400);
setcolor(BLACK);
setfont(32, 0,"宋體");
outtextxy(105,105,"sin");
outtextxy(161,105,"cos");
outtextxy(217,105,"tan");
setfont(35,7,"楷體");
outtextxy(273,105,"八進制");
outtextxy(273,165,"二進制");
outtextxy(273,225,"16進制");
outtextxy(273,285,"復數");
outtextxy(273,345,"開方");
setfont(55,0,"楷體");
outtextxy(329,105,"+");
outtextxy(329,165,"-");
outtextxy(329,225,"*");
outtextxy(329,285,"/");
outtextxy(329,345,"=");
setcolor(BLACK);
setfont(50,0,"楷體");
outtextxy(105,165,"1");
outtextxy(105,225,"4");
outtextxy(105,285,"7");
outtextxy(105,345,"#");
outtextxy(161,165,"2");
outtextxy(161,225,"5");
outtextxy(161,285,"8");
outtextxy(161,345,"0");
outtextxy(217,165,"3");
outtextxy(217,225,"6");
outtextxy(217,285,"9");
outtextxy(217,345,"!");
}
getch();
cleardevice();
getch();
closegraph();
return 0;
}
}
⑹ c語言使用ege庫如何實現兩個圖像的交換
應該是可以的。
getimage是從文件等類型中獲取圖像,不能從PIMAGE類型中獲取圖像的
⑺ c語言怎麼用EGE 圖形庫
1、EGE(Easy Graphics Engine),是windows下的簡易繪圖庫,是一個類似BGI(graphics.h)的面向C/C++語言新手的圖形庫,它的目標也是為了替代TC的BGI庫而存在。
2、它的使用方法與TC中的graphics.h相當接近,對新手來說,簡單,友好,容易上手,免費開源,而且因為介面意義直觀,即使是之前完全沒有接觸過圖形編程的,也能迅速學會基本的繪圖。 目前,EGE圖形庫已經完美支持VC6, VC2008, VC2010, C-Free, DevCpp, Code::Blocks, wxDev, Eclipse for C/C++等IDE,即支持使用MinGW為編譯環境的IDE。如果你需要在VC下使用graphics.h,那麼ege將會是很好的替代品。
⑻ 關於C語言、EGE圖形界面的問題
圖形界面是無法使用printf、cls以及其他命令行模式下的系統調用的,所以除非全用圖形界面的方式實現,否則沒有辦法⋯⋯
⑼ c語言ege圖形庫
鏈接器工具警告 LNK4098默認庫「msvcrt.lib」與其他庫的使用沖。意味著您在應用程序中,試圖鏈接不同類型的運行庫,例如混用了單線程運行庫和多線程運行庫。所以,請確認所有的項目以及文件都鏈接同一個運行庫。你可以通過右鍵項目節點,並在C/C++->代碼生成->運行庫選項中設置您的運行庫。
此外你還可以通過設置/NODEFAULTLIB選項來忽略此警告,你可以通過以下步驟來設置:
1.打開該項目的「屬性頁」對話框。。
2.單擊「鏈接器」文件夾。
3.單擊「輸入」屬性頁。
4.選擇「忽略所有默認庫」屬性或在「忽略指定庫」屬性中指定要忽略的庫列表。「命令行」屬性頁將顯示對這些屬性所做的更改的效果
參考資料:http://social.msdn.microsoft.com/Forums/en-US/ccc0c160-5812-4e36-9fe9-12627849b10a/vs2008sdlsdl