Visual C++ and MFC Fundamentals programming phần 6

Bên trong, Visual C + + tạo ra các đường dẫn và giao tiếp với trình biên dịch khi bạn thực hiện chương trình. Nếu bạn muốn tìm hiểu những gì dòng lệnh được sử dụng để thực hiện chương trình của bạn, bạn có thể gọi GetCommandLine của Win32 () chức năng. Cú pháp của nó là: LPTSTR GetCommandLine (VOID); | Visual C and MFC Fundamentals Chapter 12 Dialog-Based Windows Practical Learning Creating a Top-Most Window 1. To create the dialog box with a thin border check its Static Edge check box or set it to True 2. To indicate that this dialog can accept dragged files check its Accept Files check box or set it to True Creating the Dialog Resource File As mentioned already a dialog box means nothing except for the controls it is created to host. The controls are listed in a section that starts with the BEGIN and ends with the END keywords. Here is an example IDD_SCHOOL_SURVEY DIALOGEX 0 0 340 268 STYLE WS_CAPTION WS_SYSMEnU WS_POPUP DS_MODALFRAME EXSTYLE WS_EX_ToOlWINDOW CAPTION School Survey - For Teachers Only FONT 8 MS Shell Dlg 400 0 0x1 BEGIN END If you design a dialog box and the first object of your application you must save it before using it. Even if you had decided to manually create the dialog box as a text file you must save it before using it. In both cases whether saving the dialog box designed or the text file saving it results in creating a resource file. This file should have the .rc extension. If your resource file is using some identifiers which is the case for most or all controls you will use in your application you must list them in a header file. This file is traditionally called or . Each identifier must be listed using the following syntax define Identifier Constant When you save the resource file Visual C automatically creates the resource header file and names it After saving the resource file it is still considered external to the application. If you are using MSVC 6 you must add it to your project. After it has been added to your project you can continue working on the dialog box adding deleting or manipulating the controls. After doing that if you save the resource Visual C automatically makes the appropriate changes in the resource and the resource header files. Practical Learning Saving the Resource .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.