End_catch End_catch Note: The end of the final catch or and_catch block. End_message_map End_message_map Note: Use the end_message_map macro to end your message ing definition. Implement_dynamic Implement_dynamic (class_name, base_class_name) Note: The necessary C ++ code is generated by running the sequence class name and position of the dynamic cobject derived class in the serial structure. Use the implement_dynamic macro in the. cpp file, and then link the result object code Implement_dyncreate Implement_dyncreate (class_name, base_class_name) Note: Use the declare_dyncreate macro to use the implement_dyncreate macro to allow the cobject derived class object to be automatically created at runtime. Host enabling This function is used to automatically create an object. For example, when it reads an object from the disk during serialization, it adds the implement_dyncreate macro to the class tool. If you use Declare_dyncreate and implement_dyncreate macros, then use the runtime_class macro and cobject :: Iskindof member function to determine the object class at runtime. If declare_dyncreate is included in the definition, implement_dyncreate must be included Included in tools. Implement_serial Implement_serial (class_name, base_class_name, wschema) Note: The necessary C ++ code is established through the class name and position of the dynamic cobject derived class in the serial structure during runtime. Use the implement_serial macro in the. cpp file, and then link the result object code once. On_command On_command (ID, memberfxn) Note: This macro inserts a message ing by classwizard or manually. It indicates that the function will process a command consumption from a command User Interface (such as a menu item or toolbar button) . When a command object receives a Windows When a wm_command message is sent, on_command calls the member function memberfxn to process the message. In user message ing, for each menu or accelerator command (must be Ing to a message processing function) There must be an on_command macro statement. On_control On_control (wnotifycode, ID, memberfxn) Note: Indicates which function will process a general control to indicate the message. Control identifies messages that are sent from a controller to the parent window. On_message On_message (message, memberfxn) Note: Specifies which function will process a user-defined message. User-defined messages are generally defined within the range of wm_user to 0x7ff. User-defined messages are those that are not standard windows Any message of the wm_message message. In user message ing, each message must be mapped to a message processing function. A user-defined message should have an on_message macro statement. On_registered_message On_registered_message (nmessagevarible, memberfxn) Note: The registerwindowsmesage function of Windows is used to define a new window message, which is always unique throughout the system. This macro indicates which function processes registered messages. The nmessageviable variable should be defined by the near modifier. On_update_command_ui On_update_command_ui (ID, memberfxn) Note: This macro usually inserts a message ing through classwizard to indicate which function will process a user interface change command message. In the message ing of a user, each user interface change command (which is mapped to a message processing function) should have an on_update_command_ui macro statement. On_vbxevent On_vbxevent (wnotifycode, memberfxn) Note: This macro usually inserts a message ing through classwizard to indicate which function will process a message from vbx control. In message ing, each vbx Control Message mapped to a message processing function should have a macro statement. Runtime_class Runtime_class (class_name) Note: Use this macro to obtain the class structure during runtime from the C ++ class. Runtime_class returns a pointer to cruntimeclass for the class specified by class_name. Structure. Only cobject Derived classes defined by declare_dynamic, declare_dyncreate, or declare_serial are returned to one The pointer to the cruntimeclass structure. Throw Throw (exception_object_pointer) Note: The specified exception is sent. Throw interrupts the running of the program and passes the control to the Catch Block related to the user program. If a Catch Block is not provided, the control is passed to an MFC module, which prints an error and terminates the operation. Throw_last Throw_last () Note: This macro allows the user to send a local build exception. If you try to exclude a detected exception, the exception will generally overflow and be deleted. Throw_last is used. This exception is directly transmitted to the next catch handler. Trace Trace (exp) Note: Send a formatted string to a dump device, such as a file or debugging monitor, and provide functions similar to printf. Same as printf of C program in ms_dos, trace macro Is a convenient form of tracking variable values when the program is running. In the debug environment, the trace macro is output to afxdump. He does not do any work in release. Note: This macro is only valid in the debug version of MFC. Trace0 Trace0 (exp) Note: Similar to the trace, but it places the trace string in the code segment, instead of the dgroup, So it uses less dgroup space. Trace0 is a variant of a group of Trace macros that can Used for debugging output. This group includes trace0, trace1, trace2, and trace3. These macros differ in the number of parameters they take. Trace0 only takes one formatted character String and can be used for simple text messages. Trace1 takes a formatted string and adds a variable -- a variable that will be dumped. Similarly, trace2 and trace3 take two or three parameters respectively ( String ). If you use the release version of the application, it only dumps data to afxdump. Note: This macro is only valid in debug of MFC. Trace1 Trace1 (exp, param1) Note: See trace0 Trace2 Trace2 (exp, param1, param2) Note: See trace0 Trace3 Trace3 (exp, param1, param2, param3) Note: Try Try Note: Use this macro to create a try block. A try identifies a code block that can exclude exceptions. These exceptions are handled in subsequent catch and and_catch blocks. Transfer is allowed: An exception can be passed to an external try block, ignore them, or use the throw_last macro. Verify Verify (booleanexpression) Note: In the debug version of MFC, verify macro calculates its variable value. If the result is 0, a macro prints a Diagnostic message and terminates the program. If the condition is not 0, nothing will be done. Diagnosis can be performed as follows: assertion failed in File in line Here, name is the name of the source file, and num is the stop line number that failed in the source file. In the release version of MFC, verify calculates the expression value but does not print or stop the program. For example If the expression is a function call, the call is successful. |