freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

visualc++ mfc簡(jiǎn)要介紹 計(jì)算機(jī)專業(yè)畢業(yè)設(shè)計(jì)外文翻譯 畢業(yè)設(shè)計(jì)外文翻譯-全文預(yù)覽

2024-12-21 09:23 上一頁面

下一頁面
  

【正文】 CRect(0,0,200,200))。它是一個(gè)全面的應(yīng)用程序開發(fā)環(huán)境,使用它你充分利用具有面向?qū)ο筇匦缘? C++ 來開發(fā)出專業(yè)級(jí)的 Windows 應(yīng)用程序。這種層次結(jié)構(gòu)適用于所有版本的 Windows 并彼此兼容。下一節(jié)中將向你詳細(xì)解釋這些代碼。首先,你要決定什么樣的用戶能使用該程序并根據(jù)需要來設(shè)置相應(yīng)的用戶界面對(duì)象。這對(duì)于一些比較小的項(xiàng)目,以及一些大項(xiàng)目的早期原型階段是可以的。該界面是由幾百個(gè) C 函數(shù)所組成,這些函數(shù)在 Windows API 參考手冊(cè)中都有介紹。它減少了大量在建立 Windows 程序時(shí)必須編寫的代碼。 當(dāng)是使用 MFC 時(shí),你編寫的代碼是用來建立必要的用戶界面控制并定制其外觀。一旦應(yīng)用程序正確的響應(yīng)了所有允許的控制,它的任務(wù)也就完成了。 Windows 詞匯 在 Windows 用戶界面和軟件開發(fā)中所要用到的詞匯都是基本和唯一的。 Windows 支持幾種類型的應(yīng)用程序窗口。模式對(duì)話框一旦出現(xiàn)在屏幕上,只有當(dāng)它退出時(shí),屏幕上該應(yīng)用程序的其余部分才能響應(yīng)。 Windows 也提供了一種稱為多文檔界面的組織形式,它可用于更復(fù)雜的應(yīng)用程序。在 MDI 框架中,主窗口有一個(gè)主菜單,它對(duì)主框架中最頂端窗口有效。應(yīng)用程序界面的好壞取決于你如何選擇和組織這些界面對(duì)象。從用戶角度來看 ,各系統(tǒng)的界面對(duì)象都是相同的:按鈕、滾動(dòng)條、圖標(biāo)、對(duì)話框以及下拉菜單等等。為了建立 GUI 程序,程序員第一步要把所有需要的用戶界面控制都放到窗口上。所做的響應(yīng)依賴于用戶使用鼠標(biāo)或鍵盤在不同控制上的操作。 Windows 所用的模式也是類似的。 如果你從未做過事件驅(qū)動(dòng)程序設(shè)計(jì),則所有這些對(duì)你來說可能是很陌生的。應(yīng)用程序通常通過一段稱為事件循環(huán)的的代碼來響應(yīng)用戶的操作。事件驅(qū)動(dòng)系統(tǒng)把用戶的動(dòng)作如鼠標(biāo)單擊和鍵盤操作定義為事件,也把系統(tǒng)操作如更新屏幕定義為事件。當(dāng)屏幕上有很多對(duì)象時(shí),應(yīng)用程序會(huì)變得很大。如果你把某一用戶界面對(duì)象放在屏幕上,你只需要兩行代碼來建立它。第四部分介紹了怎樣使用消息映射來處理事件。如果你是第一次看到這類程序,也許比較難理解。 }。 }。 return TRUE。 } 上面的這段程序如果用 C 來實(shí)現(xiàn),得需要幾頁的代碼。第二,應(yīng)用程序建立了一個(gè)窗口來作為應(yīng)用程序的主窗口。如果 VC++ 已經(jīng)在該機(jī)器上使用過了,則所顯示的窗口可能有些不同,因?yàn)? VC++ 會(huì)記憶和自動(dòng)重新打開上次使用后退出時(shí)的項(xiàng)目和文件。在第二部分中我們會(huì)仔細(xì)研究這段程序, 以理解其結(jié)構(gòu)。第一,它建立了一個(gè)應(yīng)用程序?qū)ο蟆?// 建立靜態(tài)標(biāo)簽 cs = new CStatic()。 m_pMainWndShowWindow(m_nCmdShow)。 // 說明主窗口類 class CHelloWindow : public CFrameWnd {CStatic* cs。現(xiàn)在你只要用 Visual C++ 環(huán)境中建立、編譯和運(yùn)行它就可以了。下面的程序是一段簡(jiǎn)單的“ hello world”程序。該函數(shù)包含有對(duì)該按鈕作出相應(yīng)操作的代碼。 幸運(yùn)的是,你可以在比較高級(jí)的方法來進(jìn)行編程,這就是使用 MFC。例如,你用某種類型的結(jié)構(gòu)來接收單擊鼠標(biāo)事件。例如,用戶用鼠標(biāo)單擊一個(gè)按鈕。具體的細(xì)節(jié)對(duì)不同的系統(tǒng)可能有些不同,但是其基本概念是類似的。這些控制通常被稱為子窗口 它們就象一些在主窗口中的更小更特殊的子窗口。例如,如果用戶單擊退出按鈕,則該按鈕必須更新屏幕、加亮它自己。 在這個(gè)簡(jiǎn)單的程序中,程序員可能需要用戶在一個(gè)可編輯的編輯框中輸入溫度值,在一個(gè)不可編輯的編輯框中顯示轉(zhuǎn)換結(jié)果,然后讓用戶可以單擊一 個(gè)標(biāo)有“退出”的按鈕來退出應(yīng)用程序。例如,滾動(dòng)條對(duì)于 Windows、 Mac 和 Motif 可能有些不同,但他們的作用完全是一樣的。 事件驅(qū)動(dòng)軟件和詞匯所有基于窗口的 GUI 都包含相同的基本元素,它們的操作方式都是相同的。 MDI 界面可能會(huì)給你一種第二桌面的感覺,它對(duì)窗口的管理和刪除混亂的窗口有很大的幫助。例如,一個(gè)文本編輯器可以允許用戶同時(shí)打開多個(gè)文本文件。 最簡(jiǎn)單的 Windows 應(yīng)用程序是使用單文檔 界面 (SDI),只有一個(gè)框架窗口。一個(gè)框架窗口是一個(gè)全功能的主窗口,用戶可以改變尺寸、最小化、最大化等。 Windows 應(yīng)用程序使用幾個(gè)標(biāo)準(zhǔn)的控制 : 靜態(tài)文本標(biāo)簽 按鈕 列表框 組合框 (一種更高級(jí)的列表框 ) 單選按鈕 檢查按鈕 編輯框 (單行和多行 ) 滾動(dòng)條 你可以通過代碼或“資源編輯器”來建立這些 控制,在資源編輯器中可以建立對(duì)話框和這些控制。本教程的目的是比較詳細(xì)地教你如何快速建立專業(yè)級(jí)的應(yīng)用程序的技術(shù)。例如,如果用戶單擊一個(gè)按鈕時(shí),你應(yīng)該有代碼來響應(yīng)。 MFC 是可移植的,例如,在 Windows 下編寫的代碼可以很容易地移植到 Windows NT 或 Windows 95 上。 Microsoft 也提供了 C++ 庫,它位于任何 Windows API 之上,能夠使程序員的沈陽航空工業(yè)學(xué)院北方科技學(xué)院畢業(yè)設(shè)計(jì) (外文翻譯 ) 13 工作更容易。為任何 Windows 平臺(tái)建立應(yīng)用程序時(shí),程序員都有兩種選擇: C 或 C++。 要記住的是,作為程序員必須選擇一組控制并決定如何把它們安排 到屏幕上。第四部分將介紹消息映射,你將會(huì)處理 MFC 的事件。 這篇文章將向你介紹 MFC 的基本概念和術(shù)語以及事件驅(qū)動(dòng)程序設(shè)計(jì)方法。掌握了 C++,你就必須掌握 Microsoft 基本類庫 (MFC) 的層次結(jié)構(gòu)。 csCreate(hello world, WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(50,80,150,150), this)。 m_pMainWndUpdateWindow()。 public: CHelloWindow()。t worry about that. We will examine the code in detail in the next tutorial. For now, the goal is to use the Visual C++ environment to create, pile and execute this simple program. // include // Declare the application class class CHelloApp : public CWinApp { public: virtual BOOL InitInstance()。s standpoint, the systems are all similar in concept, although they differ radically in their specifics. To create a GUI program, the programmer first puts all of the needed user interface controls into a window. For example, if the programmer is trying to create a simple program such as a Fahrenheit to Celsius converter, then the programmer selects user interface objects appropriate to the task and displays them on screen. In this example, the programmer might let the user enter a temperature in an editable text area, display the converted temperature in another uneditable text area, and let the user exit the program by clicking on a pushbutton labeled quit. As the user manipulates the application39。s API Reference books. For Window39。s say you want to create a Windows application. You might, for example, need to create a specialized text or drawing editor, or a program that finds files on a large hard disk, or an application that lets a user visualize the interrelationships in a big data set. Where do you begin? A good starting place is the design of the user interface. First, decide what the user should be able to do with the program and then pick a set of user interface objects accordingly. The Windows user interface has a number of standard controls, such as buttons, menus, scroll bars, and lists, that are already familiar to Windows users. With this in mind, the programmer must choose a set of controls and decide how they should be arranged on screen. A timehonored procedure is to make a rough sketch of the proposed user interface (by tradition on a napkin or the back of an envelope) and play with the elements until they feel right. For small projects, or for the early prototyping phase of a larger project, this is sufficient. The next step is to implement the code. When creating a program for any Windows 沈陽航空工業(yè)學(xué)院北方科技學(xué)院畢業(yè)設(shè)計(jì) (外文翻譯 ) 2 platform, the programmer has two choices: C or C++. With C, the programmer codes at the level of the Windows Application Program Interface (API). This interface consists of a collection of hundreds of C functions described in the Window39。s primary advantage is efficiency. It greatly reduces the amount of code that must be written to create a Windows program. It also provides all the advantages normally found in C++ programming, such as inheritance and encapsulation. MFC is portable, so that, for example, code created under Windows can move to Windows NT or Windows 95 very easily. MFC is therefore the preferred method for developing Windows applications and will be used throughout these tutorials. When you use MFC, you write code that creates the necessary user interface controls and customizes their appearance. You also write code that responds when the user manipulates these controls. For example, if the user clicks a button, you want to have code in place that responds appropriately. It is this sort of eventhandling code t
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1