Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'c++ programming for games module ii phần 4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | MB_OKCANCEL Instructs the message box to display an OK and CANCEL button. Figure 14.5 The MB_OKCANCEL message box style. MB_YESNO Instructs the message box to display a YES and NO button. Figure 14.6 The MB_YESNO message box style. MB_YESNOCANCEL Instructs the message box to display a YES NO and CANCEL button. Figure 14.7 The YESNOCANCEL message box style. Finally the message box s return value depends on which button the user pressed here is an abridged list of return values see the Win32 documentation for more details IDOK The user pressed the OK button. IDCANCEL The user pressed the CANCEL button. IDYES The user pressed the YES button. IDNO The user pressed the NO button. You can test which value was returned using an if statement and thus determine which button the user selected and then take appropriate action. Note Many of the Win32 functions will have different style flags or values that enable you to customize various things. However because there are so many different flags for the different API functions we cannot cover all of them in this text. Therefore it is important that you learn to use the Win32 documentation to obtain further info on a Win32 function or type. The documentation is typically included in the help file of Visual C . For example in Visual C .NET you would go to the Menu- Help- Index Figure 14.8 . 100 Figure 14.8 Launching the documentation index. The index help should then open to the right of the interface. Enter the function of type you would like more information on as Figure 14.9 shows we search for MessageBox. Figure 14.9 Searching for the MessageBox documentation. 101 Finally selecting double click on the found MessageBox entry gives us several subcategories more information can be found Figure 14.10 Selecting the MessageBox documentation for the Win32 API. Here we want to select the Windows User Interface Platform SDK this is essentially the Win32 API documentation guide. So selecting that yields the complete documentation for .