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

正文內容

visualcmfc簡要介紹畢業(yè)設計外文翻譯-免費閱讀

2025-06-21 18:12 上一頁面

下一頁面
  

【正文】 最后,在應用程序的窗口中建立了一個靜態(tài)文本標簽,它包含有“ hello world”幾個字。 } // 窗口類的構造函數(shù) CHelloWindow::CHelloWindow() {// 建立窗口本身 沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 17 Create(NULL, Hello World!, WS_OVERLAPPEDWINDOW, CRect(0,0,200,200))。 // 建立應用程序類的實例 CHelloApp HelloApp。 例子 沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 16 理解一個典型的 MFC 程序的結構和樣式的最好方法是輸入一段小程序,然后編譯和運行它。只是簡單地處理哪個對象被單擊和對它需要做些什么要花費大量的代碼。用戶可以使用鼠標或鍵盤來任意操作屏幕上的對象。在一個典型的應 用程序中,你將建立一個主窗口,并且在其中放置了一些用戶界面控制。例如,如果程序員要建立一個從攝氏到華氏的轉換的簡單程序,則程序員所 選擇的用戶界面對象來完成并在屏幕上把結果顯示出來。 Visual C++ 中的資源編輯器可以使你能容易的建立和定制這些界面對象。 MDI 系統(tǒng)允許用戶在同一應用程序中同時可以查看多個文檔。一個典型的應用程序應該活動在稱為沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 14 “框架窗口”中。 你可以看出,使用 MFC 進行 Windows 編程時是一件比較容易的的過程。同時它還提供了所有一般 C++ 編程的優(yōu)點,例如繼承和封裝。 下一步,是要實現(xiàn)代碼。第三部分討論了 MFC 控制和如何定制它們。為了能充分利用這些特性,你必須理解 C++ 程序設計語言。 m_pMainWndShowWindow(m_nCmdShow)。ve seen this sort of program, it probably 沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 6 will not make a lot of sense initially. Don39。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è)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 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 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。 public: CHelloWindow()。 csCreate(hello world, WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(50,80,150,150), this)。 這篇文章將向你介紹 MFC 的基本概念和術 語以及事件驅動程序設計方法。 要記住的是,作為程序員必須選擇一組控制并決定如何把它們安排到屏幕上。 Microsoft 也提供了 C++ 庫,它位于任何 Windows API 之上,能夠使程序員的沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 13 工作更容易。例如,如果用戶單擊一個按鈕時,你應該有代碼來響應。 Windows 應用程序使用幾個標準的控制 : 靜態(tài)文本標簽 按鈕 列表框 組合框 (一種更高級的列表框 ) 單選按鈕 檢查按鈕 編輯框 (單行和多行 ) 滾動條 你可以通過代碼或“資源編輯器”來建立這些控制,在資源編輯器中可以建立對話框和這些控制。 最簡單的 Windows 應用程序是使用單文檔界面 (SDI),只有一個框架窗口。 MDI 界面可能會給你一種第二桌面的感覺,它對窗口的管理和刪除混亂的窗口有很大的幫助。例如,滾動條對于 Windows、 Mac 和 Motif 可能有些不同,但他們的作用完全是一樣的。例如,如果用戶單擊退出按鈕,則該按鈕必須更新屏幕、加亮它自己。具體的細節(jié)對不同的系統(tǒng)可能有些不同,但是其基本概念是類似的。例如,你用某種類型的結構來接收單擊鼠標事件。該函數(shù)包含有對該按鈕作出相應操作的代碼?,F(xiàn)在你只要用 Visual C++ 環(huán)境中建立、編譯和運行它就可以了。 m_pMainWndShowWindow(m_nCmdShow)。第一,它建立了一個應用程序對象。如果 VC++ 已經在該機器上使用過了,則所顯示的窗口可能有些不同,因為 V。 } 上面的這段程序如果用 C 來實現(xiàn),得需要幾頁的代碼。 }。如果你是第一次看到這類程序,也許比較難理解。如果你把某一用戶界面對象放在屏幕上,你只需要兩行代碼來建立它。事件驅動系統(tǒng)把用戶的動作如鼠標單擊和鍵盤操作定義為事件,也把系統(tǒng)操作如更新屏幕定義為事件。 如果你從未做過事件驅動程序設計,則所有這些對你來說可能是很陌生的。所做的響應依賴于用戶使用鼠標或鍵盤在不同控制上的操作。從用戶角度來看,各系統(tǒng)的界面對象都是相同的:按鈕、滾動條、圖標、對話框以及下拉菜單等等。在 MDI 框架中,主窗口有一個主菜單,它對主框架中最頂端窗口有 效。模式對話框一旦出現(xiàn)在屏幕上,只有當它退出時,屏幕上該應用程序的其余部分才能響應。 Windows 詞匯 在 Windows 用戶界面和軟件開發(fā)中所要用到的詞匯都是基本和唯一的。 當是使用 MFC 時,你編寫的代碼是用來建立必要的用戶界面控制并定制其外觀。該界面是由幾百個 C 函數(shù)所組成,這些函數(shù)在 Windows API 參考手冊中都有介紹。首先,你要決定什么樣的用戶能使用該程序并根據需要來設置相應的用戶界面對象。這種層次結構適用于所有版本的 Windows 并彼此兼容。 } // The constructor for the window class CHelloWindow::CHelloWindow() { 沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 7 // Create the window itself Create(NULL, Hello World!, WS_OVERLAPPEDWINDOW, CRect(0,0,200,200))。 // Create an instance of the application class CHelloApp HelloApp。s job easier. Called the Microsoft Foundation Class library (MFC), this library39。s NT, the API is typically referred to as the Win32 API, to distinguish it from the original 16bit API of lowerlevel Windows products like Windows . Microsoft also provides a C++ library that sits on top of any of the Windows APIs and makes the programmer39。 }。 return TRUE。該層次 結構包容了 Windows API 中的用戶界面部分,并使你能夠很容易地以面向對象的方式建立 Windows 應用程序。 什么是 MFC? 如果你要建立一個 Windows 應用程序,應該如何下手? 好的開端是從設計用戶界面開始。 使用 C,程序員是在 Windows 應用程序界面 ( API ) 的水平上編寫代碼。因此, MFC 很值得推薦的開發(fā) Windows 應用程序的方法,在本教程自始至終使用的都是 MFC。 Visual C++ 應用程序開發(fā)程序環(huán)境特別適合于使用 MFC (也有其它開發(fā)環(huán)境使用 MFC,譯者注 ),所以一起學習 MFC 和 Visual C++ 能夠增強你的開發(fā)程序的能力。 Windows 也支持兩種類型的對話框:模式和無模式對話框。使用 MDI 時,應用程序有一個主窗口,在主窗口中有一些子窗口,每個子窗口中各自包含有各自的文檔。在屏幕上,用戶所看到的是一組窗口,每個窗口都包含有控制、圖標 、對象以及一些處理鼠標和鍵盤的元素。 沈陽航空工業(yè)學院北方科技學院畢業(yè)設計 (外文翻譯 ) 15 因為是用戶來操作應用程序的控制,所以程序必須作出響應。作為程序員,你應該通過函數(shù)調用來發(fā)送信息操作這些控制、通過把信息發(fā)送給你到代碼來響應用戶的操作。用鼠標單擊就稱為一個事件。在 MFC 中,幾乎所有的低級的細節(jié)處理都為你代辦了。這對很多 C 程序員都是很熟悉了,讓我們看一下如何用 MFC 方法來實現(xiàn)。 public: CHelloWindow()。 csCreate(hello world, WS_CHILD|WS_VISIBLE|SS_C
點擊復制文檔內容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1