This article from: http://mail.ustc.edu.cn /~ Bywang/programm/vc/sx/8.html
Before reading this article, we assume that you have:1. Know how to create an App Wizard for a single document2. Familiar with C ++ classes, function overloading, and other simple knowledge3. Know how to add member variables to the View class or Doc file.4. It is best to use the IDE debugging tool of MFC. You can copy the program in this article for debugging.5. Know how to add virtual functions or message processing fun
information, all belong to the passive protection mechanism.
The protection mechanism is usually deployed on the operating system, hardware, or firmware. cissp CBK divides it into three types based on the deployment location: Platform, mainframe, and network ), the following j0ker will introduce the protection mechanisms used in these three categories one by one:
Platform protection and mainframe protectio
() to obtain document objects;8. Frame-> View: Use the getactiveview method;9. Frame-> DOC: getactivedocument ();10. View-> frame: getparentframe ();11. View-> DOC: getdocuemt () // as mentioned above.12. Doc-> View: as mentioned above;13. Doc-> frame: I don't know if there is any direct method.Usage of pointers in MFC applications1) Get the doc pointer in the view2) obtain the mainframe pointer in the app3) obtain the
. Doc-> frame: I don't know if there is any direct method.Usage of pointers in MFC applications1) Get the doc pointer in the view2) obtain the mainframe pointer in the app3) obtain the mainframe pointer in the view.4) obtain the view (created) pointer5) Get the pointer to the current document6) Get the status bar and toolbar pointer7) Get the status bar and toolbar Variables8) obtain the menu pointer in
Usage of pointers in MFC applications
1) Get the doc pointer in the view
2) obtain the mainframe pointer in the app
3) obtain the mainframe pointer in the view.
4) obtain the view (created) pointer
5) Get the pointer to the current document
6) Get the status bar and toolbar pointer
7) Get the status bar and toolbar Variables
8) obtain the menu pointer in mainframe
5. Right-click the pop-up menu
1. Project-> Add to project-> components and controls: add pop menu.
In which class? Be sure not to select mainframe and add it to view !!
Run, added the popup menu
The oncontextmenu function is added to the program.
You can process this message by displaying a Context Menu Using the trackpopupmenu.
Displays a floating pop-up menu at the specified location and tracks the selection of items on the pop-up menu.
Bool trackp
Sichuan University may have a mainframe, so we will first take us to the machine room to see the true face of the mainframe, and then start to explain the history of the mainframe with that excitement and freshness, and finally we will go into the specific content, I really didn't expect it to be such a teacher and so boring to explain what it has to do with PC.
Package com. hbsi;Import java. awt .*;Import java. awt. event .*;Import javax. swing .*;Import java. util .*;
// Main Class
Public class GreedSnake extends KeyAdapter {
JFrame mainFrame;Canvas paintCanvas;JLabel labelScore; // card countSnake Model snkemodel = null; // snakePublic static final int DEFAULT_WIDTH = 500;Public static final int DEFAULT_HEIGHT = 300;Public static final int nodeWidth = 10;Public static final int nodeHeight = 10;
// GreedSna
communicate without hindrance.There are many deficiencies in devops, and DevOps leads to delays in code handover. The same scenario for DevOps can be seen in the repair process of major bugs.DevOps run-time software optimizationDevOps can improve knowledge and program quality in two ways. First, DevOps remains operational for many newer, object-oriented operating systems, such as Linux,devops, which are likely to be shut down. As a result, devops is prone to problems, such as the wrong garbage
= (ctestview *) getview (runtime_class (ctestbview ));
2): View class and mainframe class
A: View to obtain mainframe
This is where the lower-level gets the upper-level. Generally, you can only use global functions. Here we use cmainframe * pmain = (cmaimframe *) afxgetapp ()-> m_pmainwnd;
Or cmainframe * pmain = (cmainframe *) afxgetmainwnd ();
B: Obtain the view in
, projectevent)must be declared in the source file. Otherwise, an error occurs during execution. The main reason for the error seems to be the allocation of message code. Processing of custom messages
Custom messages are processed in the same way as predefined messages, including two processing methods: static processing and dynamic processing. static processing example.
Declare the message handler function in the header file.
MainFrame.h
class Mainframe:public wxframe
{
...
Public:
vo
page file in a frames frameThe first method is: window.open (' Url ', MainFrame, ' width=......,height= ... ');Where: Url: Need to open the page; MainFrame: The frame that loads (contains) this page; Width=......,height= ..... : Style settings for the pageAnother method is: MainFrame.document.location = "URL"; That is, the URL that specifies mainframe directly i
The latest version of Strobe provides a more comprehensive view of DB2. With Compuware's rich understanding of DB2 products and long-term experience, strobe and iStrobe also play a key role in effectively controlling MIPS usage and identifying possible cost savings.
Compuware configurationnasdaq: CPWR) provides a series of enhanced improvements to its Strobe 4.1 and iStrobe 4.1 products, helping customers save costs by increasing their visibility into DB2 applications. DB2 applications often con
tasks and I/O-intensive operations that are not directly related to the interface.
Use appropriate threadsInitialize the main method of the thread to run the program. This method can process many tasks. However, in a typical swing program, the main task is to create and run the application interface. The point when the program begins to transfer control to the UI. This is often the first place where problems occur during interaction with EDT.
The main class of the image search example is
Using Emacs to write Java programs in Linux, instead of using eclipse, netbeans, and other ide tools, gives me a cool feeling.
In fact, the most important thing is to know some details:
1) The format of the running program class after JDK 1.6 is as follows:
Java packagename. classname
The current path for running this command should be outside the directory with the same name as packagename
2) If two classes belong to the same package, use javac to compile a Class A first, and use the following
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.