?? text.c~
字號(hào):
/*以下代碼用于顯示各地區(qū)的中英文簡介*/static PLOGFONT logfontttf1, logfontttf2;int Beijing_Text (HDC hdc){ RECT rc1, rc2; const char* szBuff_Beijing_1 = " 北京歷史簡介 \n" "北京簡稱京,是中國的首都,全國的政治、文化中心和國際交往的" "樞紐,也是一座著名的歷史文化名城,與西安、洛陽、開封、南京、" "杭州并列為中國六大古都。"; const char* szBuff_Beijing_2 = "The general situation of Beijing\n"
"Beijing is the capital of PRC, which is the center of National politics," " culture, transport, tourism and international exchanges. Located" " on north latitude 39°56', east 116°20'. The whole city makes up " "of 11 zones and 7 counties.The modern Beijing has experienced about ten " "generation of operation, which had numerous illustrious Emperor City's sight" " and rich handsome cultural background, the world's largest imperial Palace " "and our Chinese largest temple of heaven,which is rarely seen in the Summer " "Palace of Royal garden, Great Wall."; rc1.left = 25; rc1.top = 45; rc1.right = 306; rc1.bottom = 150; rc2.left = 25; rc2.top = 150; rc2.right = 306; rc2.bottom = 427; SetBkColor (hdc, COLOR_lightgray); //設(shè)置字體背景顏色 SetTextColor (hdc, PIXEL_darkred); //設(shè)置字體顏色 SetPenColor(hdc, PIXEL_blue); //設(shè)置線條顏色 SetBrushColor (hdc, PIXEL_lightgray); FillBox(hdc, rc1.left, rc1.top, rc1.right-25, rc2.bottom); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); SelectFont (hdc, logfontttf2); DrawText (hdc, szBuff_Beijing_1, -1, &rc1, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); SelectFont (hdc, logfontttf2); DrawTextEx (hdc, szBuff_Beijing_2, -1, &rc2, 13, DT_LEFT | DT_CHARBREAK);}int Tokyo_Text (HDC hdc){ RECT rc1, rc2, rc3, rc4; const char* szBuff_Beijing_1 = " 東京歷史簡介 \n" "東京東南瀕臨東京灣,通連太平洋。其行政區(qū)劃為“都”,下轄23個(gè)特別區(qū)、1郡、26市、7町、8村以及伊" "豆群島、小笠原群島。面積2187平方公里,人口1200萬左右。"; const char* szBuff_Beijing_2 = "The general situation of Tokyo\n"
"The sheer level of energy is the most striking aspect of Japan's capital " "city. Tokyo remains a glittering example of the 'miracle' of post World War" " II Japan. Streets are lined with tiny specialist shops and bustling restaurants" ", most of which stay open late into the night. Close to the soaring office blocks" " exist pockets of another Tokyo - an old wooden house, a Japanese inn, an old lady" " in a kimono sweeping the pavement outside her home with a straw broom. More than" " anything else,Spring is the best time to visit Tokyo."; rc1.left = 25; rc1.top = 45; rc1.right = 306; rc1.bottom = 150; rc2.left = 25; rc2.top = 150; rc2.right = 306; rc2.bottom = 427; SetBkColor (hdc, COLOR_lightgray); //設(shè)置字體背景顏色 SetTextColor (hdc, PIXEL_darkred); //設(shè)置字體顏色 SetPenColor(hdc, PIXEL_blue); //設(shè)置線條顏色 SetBrushColor (hdc, PIXEL_lightgray); FillBox(hdc, rc1.left, rc1.top, rc1.right-25, rc2.bottom); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); SelectFont (hdc, logfontttf2); DrawText (hdc, szBuff_Beijing_1, -1, &rc1, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); SelectFont (hdc, logfontttf2); DrawTextEx (hdc, szBuff_Beijing_2, -1, &rc2, 13, DT_LEFT | DT_CHARBREAK);}int Newyork_Text (HDC hdc){ RECT rc1, rc2, rc3, rc4; const char* szBuff_Beijing_1 = " 紐約歷史簡介 \n" "紐約,是美國人口最多的城市,包括其都市圈,它擁有世界上最大的城市區(qū)。" "超過一個(gè)世紀(jì)的時(shí)間,紐約是世界上最主要的商業(yè)和金融中心,紐約是美國最大" "城市及第一大港。 "; const char* szBuff_Beijing_2 = "The general situation of Newyork\n"
"New York or New York City (officially The City of New York), a city in the " "state of New York, is the most populous city in the United States. For more " "than a century, it has been one of the world's leading business, financial and" " cultural centers and its influence in politics, education, entertainment, sports" ", media, fashion and the arts all contribute to its status as one of the major" " global cities. As the home of the United Nations, the city is a hub for" " international diplomacy,Residents of the city are known as New Yorkers."; rc1.left = 25; rc1.top = 45; rc1.right = 306; rc1.bottom = 150; rc2.left = 25; rc2.top = 150; rc2.right = 306; rc2.bottom = 427; SetBkColor (hdc, COLOR_lightgray); //設(shè)置字體背景顏色 SetTextColor (hdc, PIXEL_darkred); //設(shè)置字體顏色 SetPenColor(hdc, PIXEL_blue); //設(shè)置線條顏色 SetBrushColor (hdc, PIXEL_lightgray); FillBox(hdc, rc1.left, rc1.top, rc1.right-25, rc2.bottom); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); SelectFont (hdc, logfontttf2); DrawText (hdc, szBuff_Beijing_1, -1, &rc1, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); SelectFont (hdc, logfontttf2); DrawTextEx (hdc, szBuff_Beijing_2, -1, &rc2, 13, DT_LEFT | DT_CHARBREAK);}int Rome_Text (HDC hdc){ RECT rc1, rc2, rc3, rc4; const char* szBuff_Beijing_1 = " 羅馬歷史簡介 \n" "紐約,是美國人口最多的城市,包括其都市圈,它擁有世界上最大的城市區(qū)。" "超過一個(gè)世紀(jì)的時(shí)間,紐約是世界上最主要的商業(yè)和金融中心,紐約是美國最大" "城市及第一大港。 "; const char* szBuff_Beijing_2 = "The general situation of Rome\n"
"New York or New York City (officially The City of New York), a city in the " "state of New York, is the most populous city in the United States. For more " "than a century, it has been one of the world's leading business, financial and" " cultural centers and its influence in politics, education, entertainment, sports" ", media, fashion and the arts all contribute to its status as one of the major" " global cities. As the home of the United Nations, the city is a hub for" " international diplomacy. "; rc1.left = 25; rc1.top = 45; rc1.right = 306; rc1.bottom = 150; rc2.left = 25; rc2.top = 150; rc2.right = 306; rc2.bottom = 427; SetBkColor (hdc, COLOR_lightgray); //設(shè)置字體背景顏色 SetTextColor (hdc, PIXEL_darkred); //設(shè)置字體顏色 SetPenColor(hdc, PIXEL_blue); //設(shè)置線條顏色 SetBrushColor (hdc, PIXEL_lightgray); FillBox(hdc, rc1.left, rc1.top, rc1.right-25, rc2.bottom); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); SelectFont (hdc, logfontttf2); DrawText (hdc, szBuff_Beijing_1, -1, &rc1, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); SelectFont (hdc, logfontttf2); DrawTextEx (hdc, szBuff_Beijing_2, -1, &rc2, 13, DT_LEFT | DT_CHARBREAK);}int Berlin_Text (HDC hdc){ RECT rc1, rc2, rc3, rc4; const char* szBuff_Beijing_1 = " 柏林歷史簡介 \n" "紐約,是美國人口最多的城市,包括其都市圈,它擁有世界上最大的城市區(qū)。" "超過一個(gè)世紀(jì)的時(shí)間,紐約是世界上最主要的商業(yè)和金融中心,紐約是美國最大" "城市及第一大港。 "; const char* szBuff_Beijing_2 = "The general situation of Berlin\n"
"New York or New York City (officially The City of New York), a city in the " "state of New York, is the most populous city in the United States. For more " "than a century, it has been one of the world's leading business, financial and" " cultural centers and its influence in politics, education, entertainment, sports" ", media, fashion and the arts all contribute to its status as one of the major" " global cities. As the home of the United Nations, the city is a hub for" " international diplomacy. "; rc1.left = 25; rc1.top = 45; rc1.right = 306; rc1.bottom = 150; rc2.left = 25; rc2.top = 150; rc2.right = 306; rc2.bottom = 427; SetBkColor (hdc, COLOR_lightgray); //設(shè)置字體背景顏色 SetTextColor (hdc, PIXEL_darkred); //設(shè)置字體顏色 SetPenColor(hdc, PIXEL_blue); //設(shè)置線條顏色 SetBrushColor (hdc, PIXEL_lightgray); FillBox(hdc, rc1.left, rc1.top, rc1.right-25, rc2.bottom); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); SelectFont (hdc, logfontttf2); DrawText (hdc, szBuff_Beijing_1, -1, &rc1, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); SelectFont (hdc, logfontttf2); DrawTextEx (hdc, szBuff_Beijing_2, -1, &rc2, 13, DT_LEFT | DT_CHARBREAK);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -