Visual C Windows Programming Modal IDDMYDIALOG 0 0

  • Slides: 12
Download presentation
Visual C++ Windows Programming 第九章 Modal 對話盒 台大電機系 李奇錚

Visual C++ Windows Programming 第九章 Modal 對話盒 台大電機系 李奇錚

對話盒的基本觀念 (續) • 描述對話盒外觀的資訊 – 利用廠商所提供的圖形介面 – 利用文字方式編輯 IDD_MYDIALOG 0, 0, 160, 68 STYLE

對話盒的基本觀念 (續) • 描述對話盒外觀的資訊 – 利用廠商所提供的圖形介面 – 利用文字方式編輯 IDD_MYDIALOG 0, 0, 160, 68 STYLE DS_MODALFRANE | WS_POPUP | WSVISBLE CAPTION “TESTING” FONT 8 , “MS Sans Serif” BEGIN LTEXT “&Name” , -1 , 8, 14 , 24 , 8 EDITTEXT IDC_NAME , 34, 12, 118, 12 ES_AUTOHSCROLL END

對話盒的基本觀念 • 關閉對話盒 – End. Dialog( int n. Result) Ex. End. Dialog( IDOK)

對話盒的基本觀念 • 關閉對話盒 – End. Dialog( int n. Result) Ex. End. Dialog( IDOK)

對話盒的基本觀念 • MFC事先定義好的常數 – – – – IDOK 1 IDCANCEL 2 IDABORT 3 IDRETRY

對話盒的基本觀念 • MFC事先定義好的常數 – – – – IDOK 1 IDCANCEL 2 IDABORT 3 IDRETRY 4 IDIGNORE 5 IDYES 6 IDNO 7

對話盒的基本控制元件 • • • • Static Text Group Box Check Box Combo Box Horizontal

對話盒的基本控制元件 • • • • Static Text Group Box Check Box Combo Box Horizontal Scroll Bar • • • • Picture Edit Box Button Radio Button List Box Vertical Scroll Bar

Windows 共用控制元件 • • • • Spin Slider List Control Tab Control Rich Edit

Windows 共用控制元件 • • • • Spin Slider List Control Tab Control Rich Edit Month Calendar Custom Control • • • • Progress Hot Key Tree Control Animate Date Time Picker IP Address Extended Combo Box