1 / 32

高等視窗程式設計

高等視窗程式設計. GUI 的使用 (Dialog Base). 游子宜. 開啟新的 MFC 專案. Step1 :新增 MFC 專案. Step2 :歡迎畫面. Step3 :選取應用程式類型. Step4 :設定進階功能. Step5 :完成專案初始化. 對話盒控制項的種類. Button Static Text Edit Box. Button 的介紹. Step1 :選 取 button 工具. Button 的介紹 ( 續 ). Step2 :調整 button 的屬性. Button 的介紹 ( 續 ).

elita
Télécharger la présentation

高等視窗程式設計

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 高等視窗程式設計 GUI的使用(Dialog Base) 游子宜

  2. 開啟新的MFC專案

  3. Step1:新增MFC專案

  4. Step2:歡迎畫面

  5. Step3:選取應用程式類型

  6. Step4:設定進階功能

  7. Step5:完成專案初始化

  8. 對話盒控制項的種類 • Button • Static Text • Edit Box

  9. Button的介紹 • Step1:選取button工具

  10. Button的介紹(續) • Step2:調整button的屬性

  11. Button的介紹(續) • Step3:調整button的屬性(續)

  12. Button的介紹(續) • Step4:對button的事件下指令

  13. Button的介紹(續) • Step5:成功建置button

  14. Static Text的介紹 • Step1:選取static text工具

  15. Static Text的介紹(續) • Step2:調整static text的屬性

  16. Static Text的介紹(續) • Step3:調整static text的屬性(續)

  17. Static Text的介紹(續) • Step4:static text無事件動作

  18. Static Text的介紹(續) • Step5:成功建置static text

  19. Edit Box的介紹 • Step1:選取edit box工具

  20. Edit Box的介紹(續) • Step2:調整edit box的屬性

  21. Edit Box的介紹(續) • Step3:調整edit box的屬性(續)

  22. Edit Box的介紹(續) • Step4:對edit box的事件下指令

  23. Edit Box的介紹(續) • Step5:成功建置edit box

  24. What is DDX & DDV ? • 由MFC所提供,用於在對話盒與對話盒物件間進行: • 資料交換 (Data Exchange): • 將user設定於對話盒中控制項中的資料,與程式所對應的對話盒物件之屬性,進行資料的交換。 • 資料檢查 (Data Vaildation): • 檢查由user輸入對話盒中傳入的資料是否正確,若違反檢查規則,則自動跳出警告方塊。

  25. What is DDX & DDV ? (續) • 需使用DDX/DDV機制的控制項: • Static Text • Edit Box • 不需使用DDX/DDV機制的控制項: • Button

  26. 以計算機程式範例為例

  27. Step6:建立對話盒使用資源

  28. Step7:建立對話盒的DDX/DDV機制

  29. Step8:建立對話盒的DDX/DDV機制(續)

  30. Step9:建立[清除]按鈕的回應函數

  31. Step10:過載OnCommand函數

  32. Step11:結果畫面

More Related