TAILIEUCHUNG - Lecture Visual programming: Chapter 25 - Muhammad Bilal Zafar

The following will be discussed in this chapter: Evaluating an SDD at the nodes of a parse tree, evaluation orders for SDD's, dependency graphs, ordering the evaluation of attributes, s-attributed definitions, l-attributed definitions, semantic rules with controlled side effects, applications of syntax-directed translation, construction of syntax trees. | LESSON 25 Overview of Previous Lesson(s) Over View Visual C++ provides us with 3 basic ways of creating an interactive Windows application Using the Windows API Using the Microsoft Foundation Classes. Using Windows Forms. 3 Over View 4 Over View A Windows program is mostly event – driven. Events in a Windows application are occurrences. Clicking the mouse. Pressing a key. Message queue for an application is just a sequence of such messages waiting to be processed by the application. 5 Over View WndProc() is the function we can use to sending the messages to our applications. Windows accesses the function through a pointer to a function. DefWindowProc() is used to pass a message back to Windows. Provides default message processing. 6 Over View WinMain() Where execution of the program begins and basic program initialization is carried out. WndProc() Called by Windows to process messages for the application. Contains the larger portion of code deals in responding to messages caused by user input of one kind or another. 7 Over View. 8 TODAY’S LESSON Contents Specifying a Program Window Creating a Program Window Dealing with Windows Messages WinMain() Message Processing Functions The WndProc() Function Decoding a Windows Message WndProc() Program Organization 10 Specifying a Program Win 1st we have to define the type of window we want to create. Windows defines a special struct type WNDCLASSEX It contains the data specified by a window. 11 WNDCLASSEX struct WNDCLASSEX { UINT cbSize; // Size of this object in bytes UINT style; // Window style WNDPROC lpfnWndProc; // Pointer to message processing function int cbClsExtra; // Extra bytes after the window class int cbWndExtra; // Extra bytes after the window instance HINSTANCE hInstance; // The application instance handle HICON hIcon; // The application icon HCURSOR hCursor; // The window cursor HBRUSH hbrBackground; // The brush defining the background color LPCTSTR lpszMenuName; // A pointer to the name of the menu

Đã 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.