The System.Drawing namespace provides access to GDI + basic graphics features, which provide more advanced functionality in some of the child namespaces.GDI +, developed by GDI, is a bridge between the Windows graphical display program and the actual physical device.GDI + is an enhanced version of GDI that provides the following three types of services:1) Two-dim
L GDI graphic interface
L Drawing Graphics
L DC, HDC device CDC
L draw a rectangle
1. Learn about GDIAnd Gui
GDIIt is the abbreviation of graphics device interface. It meansGraphical Device InterfaceIts main task is to exchange information between the system and the drawing program, and process the graphics output of all Windows programs.
In Windows, most applications with graphical interfaces are inseparable from
Development Environment: vs2005
1. Win32 Project
1,
// Add the following code:
# Include # Pragma comment (Lib, "gdiplus. lib ")
Using namespace gdiplus;
// # Include "stdafx. H"
// Cancel the definition of win32_lean_and_mean in stdafx. H. (otherwise, N errors will occur. The specific cause is not clear)
// # Define win32_lean_and_mean // exclude rarely used information from the Windows Header
2,
// Add the following code to int apientry _ twinmain:
// Initialize
Today, I encountered a small problem. That is, the problem of using GDI + to load resource bitmap. Compile some content into the EXEProgramGo to and search for the internet. The experience is summarized as follows:
1. Unicode must be used for GDI +, so # define Unicode must be set in stdafx. h.
2. Bitmap can directly load bitmap * tmpbitmap = bitmap: fromresource (_ module. getresourceinstance (), makei
Recently, GDI + this thing contact more, also did some simple examples, such as drawing board, imitation QQ and so on.
The first contact this class, is because want to do the effect of imitation QQ. Skillfully very, learned how to do it after that. NET classroom teacher also happened to talk about C # drawing knowledge, and I myself on the internet to learn the teacher's training, but also to use this class. There are some experiences in learning, so
GDI + programming (2) use a paint brushAuthor: Li Hao Original address: http://www.vckbase.com/document/viewdoc? Id = 1443 The paint brush is often used to draw the outline of a graphic. In addition to common color and width attributes, the paint brush of GDI + also has attributes such as alignment, line cap, and transformation mode. The pen class is used in GDI
Recently, there have been many contacts with the GDI +, and some simple examples have been made, such as drawing board and imitation QQ.
I first came into contact with this category because I wanted to do QQ imitation. coincidentally, after learning how to do it ,. in the NET class, the teacher also happened to want to talk about c # graphics, and I also used this class to study the Training Course of teacher Jin on the Internet. I have some experienc
In the last section, the chicken pecked the rice. The CDC class and its screen drawing functions, the main content of this section is the brush CPen of GDI objects. GDI Objects In MFC, the CGdiObject class is the base class for GDI objects, and by looking at MSDN we can see that the CGdiObject class has six direct derived classes, and the
Read requirements: Understand the basic principles and practices of C # call Win32API
--------------------------------------------------------------------------------
When you develop a WinForm control, you usually need to measure the actual size of the text when it is drawn.
The GDI + Class--system.drawing.graphics in. NET FCL provides the MeasureString method for the above needs, which returns the result of a floating point representation of a Siz
M_prndc.setmapmode (Mm_lometric);M_IPRNX = M_prndc.getdevicecaps (horzres);M_iprny = M_prndc.getdevicecaps (vertres);The M_IPRNX is wide and the M_iprny is high.Gets the horizontal and vertical resolution of the printer devicePixel points per inchint xpixperinch = Pdc->getdevicecaps (LOGPIXELSX);int ypixperinch = Pdc->getdevicecaps (Logpixelsy);If the PDC is a printer DC, then Xpixperinch =ypixperinch =600I
Installing network printer Conditions
The printer is a network cable, which means that it is accessed by IP address, to set the IP address in the printer can be
Network printer installation Steps
How to install a network printer under Windows XP
1, click Start menu, open
To set up a computer that shares a printer:
1: Two machines are determined to be connected to a local area network, in the same working group, and guaranteed to exchange visits.
2: Make sure the printer driver is properly installed on the computer that is connected to the printer and is working properly.
3: Check My Network Places properties Local Area Connect
1. device context
// Obtain the DC
HDC getdc (hwnd)
// Release the DC
Int releasedc (hwnd, hdc dc Name );
2. GDI object: Create-> select-> Delete// Create a paint brushHpen createpen (INT style, int width, colorref color );// Create a shadow image brushHbrush createhatchbrush (INT style, colorref color );// Create a monochrome image brushHbrush createsolidbrush (colorref color );
// Select the GDI obj
In the previous stage, I saw a lot of questions from some netizens about designing some buttons with unique styles, or I had to make one on some controls.
Some icons
The question of things is often answered by a "using GDI +". So what is GDI +? How to Apply GDI +
What about it? Today
Let's make a small example, hoping to help you:
1
In MFC, you will often encounter image processing controls such as adding transparent background images. In this case, you will use GDI or GDI +. Due to customer requirements, I was forced to use the MFC project for the first time. I used to use VC ++ to do some small tools and ActiveX, and encountered many headaches. It would be better to sort out and sort out the knowledge here if it could help others.
I.
The graphics class is the core of GDI +. Graphics provides a method to draw objects to display devices. Graphics can be associated with the context of a specific device and is an object used to create a graph. It encapsulates the methods for drawing straight lines, curves, graphs, images, and texts. It is a class for using GDI + to draw straight lines, curves, graphs, images, and texts. It is the basic clas
Case 1: The printer is not powered up or the printer is not online
Some Office users can not print the file when the printer, is due to the printer power is not open, or may accidentally touch the printer-related Settings button, switch to a non-online status, these two l
In the previous piece has been introduced to you how to use GDI + to draw a simple image, this piece continues to introduce some other drawing knowledge.
1. First, let's look at the pen we used in the last piece.
Pen properties are mainly: color (color), dashcap (dash End shape), dashstyle (dotted style), endcap (line End shape), startcap (thread shape), Width (thickness), and so on.
We can use pen to draw dashes, lines with arrows, etc.
Pen p = n
6. Transparent, translucent and opaque
This is a big problem. In WINFORM/WPF we often see some of the properties of transparency, such as the BackColor can choose Transparant, the form has a property called opacity. are related to transparency and transparency. In fact there are some things on the GDI + application layer where I'm not going to talk about it. It's mainly from a more basic point of view, which includes two completely different content.
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.