TAILIEUCHUNG - Visual C++ and MFC Fundamentals programming phần 5

Để thực hiện một chương trình, bạn phải giao tiếp con đường của nó và có thể một số thông số bổ sung để trình biên dịch. Thông tin này được gọi là dòng lệnh thông tin và nó được cung cấp như là một chuỗi. Bạn cần phải giữ cho rằng trong tâm trí mặc dù tất cả các chương trình của cuốn sách này sẽ được biên dịch bên trong của Visual C + +. Các dòng lệnh thông tin được cung cấp cho trình biên dịch như là đối số lpCmdLine WinMain () chức năng | Visual C and MFC Fundamentals Chapter 12 Dialog-Based Windows The Command Line To execute a program you must communicate its path and possibly some additional parameters to the compiler. This information is called the command line information and it is supplied as a string. You need to keep that in mind although all programs of this book will be compiled inside of Visual C . The command line information is supplied to the compiler as the IpCmdLine argument of the WinMain function. Internally Visual C creates the path and communicates it to the compiler when you execute the program. If you want to find out what command line was used to execute your program you can call the Win32 s GetCommandLine function. Its syntax is LPTSTR GetCommandLine VOID This function takes no argument but returns the command line of an application as null-terminated string. Here is an example void CCommandLineDlg OnBtnCmdLine TODO Add your control notification handler code here char CmdLine 80 char CmdResult 80 strcpy CmdLine GetCommandLine sprintf CmdResult s CmdLine s CmdResult UpdateData FALSE FunctionX Inc. 281 Chapter 12 Dialog-Based Windows Visual C and MFC Fundamentals Frame Display Options The nCmdShow argument of the WinMain function specifies whether and how you want to display the window when the user attempts to open it. This is a constant value that is actually passed to a function that is in charge of displaying the window. Its possible values are Value Description SW SHOW Displays a window and makes it visible SW_SHOWNORMAL Displays the window in its regular size. In most circumstances the operating system keeps track of the last location and size a window such as Internet Explorer or My Computer had the last time it was displaying. This value allows the OS to restore it. SW_SHOWMINIMIZED Opens the window in its minimized state representing it as a button on the taskbar SW SHOWMAXIMIZED Opens the window in its maximized state .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.