1. DefinitionCDC * PDC; HDC HDC;2. ExplanationHDC is a data type for Windows and is a device description handle.The CDC is a class in MFC that encapsulates almost all of the operations on HDC.The variables defined by HDC point to a piece of memory, which is used to describe the related contents of a device, so it can also be assumed that the HDC defines a pointer;The CDC class defines an object that has a
This article continues with my notes. The previous article introduced the persistence function of the image output by the CDC. It only introduced one method (the most common method for saving and redrawing drawing data ), this introduces the second method,
This method uses metadata files to save the images you have drawn. The idea is simple:
Metadata is used to maintain user-drawn graphics.
Ideas:
Each time the metadata file DC is used, the use
To continue with the previous two topics, the third way to enable the CDC to maintain its output graphics is to use compatible DC.
Ideas
First, use the current drawing DC to create a compatible DC.
Compatible with DC is equivalent to a reference to the DC associated with it. It is like a canvas where users draw images. When the screen weight is painted, copy the canvas directly to the current DC to maintain the image. Speaking of a canvas, DC
data. Before saving, convert the set point to a logical point.OnPrepareDC ( dc );Dc. DPtoLP ( m_ptOrigin );Dc. DPtoLP ( point );// Allocate a space in the heap to save the redrawing data.CGraph * g = new CGraph (m_nDrawType, m_ptOrigin, point); // must use a point to CGraph// M_ptArray is a member variable of the CPtrArray type.M_ptrArray.Add (g );CScrollView: OnLButtonUp (nFlags, point );}
The last step is to re-draw these images when redrawing the window.
Code highlighting produced by Act
CDC,CPAINTDC,CCLIENTDC,CWINDOWDC differences————————————————————————1, first, the DC to explain:Windows applications draw graphics on the "canvas" of the logical meaning of the DC representation by creating a device description table for the specified device (screen, printer, etc.). A DC is a data structure that contains device information that contains the various state information required by a physical device. The WIN32 program needs to get the DC
AlthoughGilbertPreviously introducedCwndAndHwndDifference,But here we are talking to several otherCDC, HDCRepeat the differences and relationships..
1.Objects and handles
CwndYes, HwndYes handle, CwndEncapsulatedHwnd
Cwnd WND;
Hwnd;
WND. Attach (hwnd );//HandleObject
WND-> m_hwnd ;//ObjectTo handle
Of courseProgramIs used to obtain the handle.:
Afxgetmainwnd ()-> m_hwnd;
The same, CDCAndHDCThis is also the relationship.:
CDC *
The author recently participated in the research and development of a product used in the CDC Mbim modem, demand side requirements can be normal in the product display Mbim signal strength, because the device is in the form of network cards in the system, and different from the traditional serial form of the adapter to access the form, Therefore, it is not possible to use the serial port to send AT+CSQ to obtain the signal strength.By looking at MSDN,
, USB ethernet and so on.
The Atmel USB port frame diagram:
Configure kernel configure with the following command Supportgadget serial
1 Copy kernel Configure file to the obj directory in the current directory
2 Configuring the Configure file under the obj directory
3 Save the configured configure file as a. config
4 copy. config file to the CONIFG directory of Linux kernel
Make Mtxxxx_smp_mod_dbg_defconfig arch=arm o=obj/mtxxxx_smp_mod_dbg_defconfig
Make Menuconfig arch=arm o=obj/mtxxxx_smp_
HDC = GetDC (hwnd);GetDC function: A device environment used to obtain the client area of the window specified by the HWND parameter.The acquired device environment can be a generic, class, or private type, depending on the class style of the specified window. For a general-purpose device environment, the GETDC function initializes it with the default properties each time it acquires a device environment.The classes and private device environments that the function obtains are consistent with th
CDCThe base class of the Environment class of all devices. It encapsulates all the drawing functions of GDI and can be directly accessed.Context of the entire display or non-Display Device (such as a printer)
CpaintdcCpaintdc is used to redraw the Drawing Output of the message (wm_paint) in the response window.You can also operate non-customer zones.
CclientdcIt represents the device environment of the window customer area. It is generally used when responding to non-window messages and drawin
other modes, but it can produce high-quality images, and it should be noted that after setting the halftone mode, the Setbrushorgex function should be called to avoid brush misalignment. Depending on the capabilities of the device driver, some other stretch modes may also be valid. CBitmap bitmap; Comm. Loadbmpfromfile (SBMP,BITMAP); CRect rect; GetClientRect (rect); Get the target size, i.e. the coordinates of the window client area bitmap bit; Bitmap structure body bitmap.
task, I first thought of Uncle Mark. About the standard uncle, not to say, in my vague understanding of interactive design, this is one of his deep influence on my article: "Tencent CDC standard Uncle Masterpiece!" I talked to the 10 years of interactive design.
D2: Preparing the Interview script
The interview, of course, is to do a prepared interview, the question to ask is best prepared in advance, to anticipate the interview scenario, to make sp
Create a project with a single document structure
HDC:
First, add windows message handler in the cyourclassview class. One is lbuttondown and the other is lbuttonup. Add the member variable m_ptorigin to record the initial vertex position.
Initialize the m_ptorigin variable in the view struct:
Cyourclassview: cyourclassview ()
{
// Todo: Add construction code here
M_ptorigin = 0;
}
Add the code to the lbuttondown function:
Void cyourclassview: onlbuttondown (uint nflags, cpoint point)
{
// Todo:
the iphone. After updating and launching the app, I instantly saw the following message: "Your timeline data is empty and you're not looking at anyone yet" (but I'm an active user with 5 years of experience). I was worried for a moment, and thankfully, the news soon disappeared and then loaded the historical data.Testing is not a right or wrong judgmentWe discussed some aspects of mobile testing, but the premise is that problems can be found with problems. Typically, tests are considered to be
C ++'s knowledge about CDC
Hdc = GetDC (hwnd );
GetDc function: This function is used to obtain a device environment in the customer region of the window specified by the hWnd parameter.The device environment can be general, class, or private, which is determined by the class style of the specified window. For a general device environment, the GetDc function initializes a device environment with the default attribute every time it gets it.
The clas
Http://www.cnblogs.com/downmoon/archive/2012/04/10/2439462.html
SQL Server 2008 Application Series-Directory Index
This article focuses on four methods for recording data changes in SQL Server: triggers, output clauses, change data capture (changes Capture, CDC) features, and synchronous change tracking. The latter two are new to SQL Server 2008.
First, Trigger
In earlier versions of SQL Server, if you wanted to record the insert/update/delete action
Translator Note: The article is formerly known as Designing%20screens%20using%20cores%20and%20%20paths. The author is inspired by the "Traffic demand line" in urban planning, and proposes the "core-path method" of website design. The "core-path
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.