In the previous article, I showed how to connect the x server and how to create a window. Creating a window is fundamental to writing GUI programs. There are two other key points in GUI programming, one is event handling and the other is drawing in Windows. In this article, you will show how to use XCB to draw in a window.Let's look at a sample code and how it works, with the following code:1#include 2#incl
Windows form. Net Framework Drawing Technology,. net drawing
When writing a typical Windows form program,Drawing forms and controls, Effect and other operations do not need to be taken into consideration. Why? Because. NetFramewor
To browse pictures, we may use Windows default browsing mode more, or third party such as Google Picasa, or the United States to see such software to achieve the image of the browser playback. But apart from these, are there any friends who will remember the Win7 drawing program? She is not only a tool to draw, of course, can also browse pictures, and even can ac
When you write a typical Windows Forms program, the drawing, effects, and so on of forms and controls are not specifically considered. Why is this? Because by using the . Net Framework, developers can drag a series of controls onto a form and write some simple code associated with the event and then press F5 in the IDE, and a complete form
Recently made a similar Windows drawing board applet, to share with you. The function and the interface all imitate with the drawing board which the Windows own, the interface like screenshot. The main functions are: hand-painted lines, simple graphics, text input, block drag and drop, repeat undo, Zoom, open the Save
Circlei++;DeleteObject (Hpen); Delete a brushDeleteObject (Hbrush); Delete a paint brushEndPaint (HWND,PTSTR); Remove device Environment pointerSleep (100); Stop for 0.1 seconds.if (ireturn 0;Case Wm_destroy://Close windowPostQuitMessage (0);return 0;DefaultReturn (DefWindowProc (Hwnd,imessage,wparam,lparam));}}Program Run Result:Third, the experimental resultsThrough this experiment, I learned the program
->Tag == 0)Timer1->Enabled = True;BitBtn1->Caption = "结束绘图";BitBtn1->Tag = 1;}elseClose();}
5, Form1 Timer1timer Process code is as follows:
void __fastcall TForm1::Timer1Timer(TObject *Sender){GetCursorPos(pt);StretchBlt(hdcButton, 0, 0, 60, 25, hdcDesktop, pt.x - 30, pt.y - 12, 60, 25, SRCCOPY);}
7, press F9 to run the program. The above procedures in the C + + Builder 5.0, windows95/98/nt/2000 Simplified Chinese version of the debugging environm
the principle of windows-message mapping mechanism and simple drawing technique1.MFC message mapping mechanismAs we all know, theWindows program is based on message programming , but in MFC has encapsulated the framework of the message mechanism, we need to understand its implementation principle, in order to deep learning and proficient in Visual C + +.* * (1).
Fortunately, when you write a typical Windows Forms program, the drawing, effects, and so on of forms and controls do not need to be specifically considered. Why is that? because by using the. Net Framework, developers can drag a series of controls onto a form, write some simple code associated with the event, and then press F5 in the IDE, a complete form
In the previous sections, I demonstrated the creation of Windows using XCB, drawing in Windows, and capturing and handling events. In this article, I'll show you how to draw text in a window. Drawing text is of course inseparable from fonts, so I'll simply explore the core font system of X server. The usual, first on t
There are three ways to draw images in Windows:
(1) You tell the system the coordinates and colors of the points. The system uses setpixel to draw the points. Similarly, get a certain pixel value through getpixel.
(2) Use movetoex and lineto to strip the line. movetoex sets the starting point coordinate, lineto sets the ending point coordinate, or uses the polyline function. This function accepts an array of the point type, use the dot line in the arr
In the snow forum to see a post, very much like, reproduced a bit. Original address: http://bbs.pediy.com/showthread.php?t=138630Doraemon is drawn out, do not know the author calculate these coordinates location how long, really very sharp. Remember the original read "Windows Programming" time, every time I see GDI is not very understanding, nor careful to study. Now programming is seldom dealing with GDI, or waiting to be available later in-depth und
1, Metro Interface Press the keyboard "F3" Hot Key, and type "paint" return search, and then click Select "Paint." As shown in the following illustration:
2. Use combination Hotkey "win+r" to bring up the running window, enter "MSPaint", and then open "Paint" program.
3, in the Metro interface, and then click the right mouse button, click on the bottom of the screen "All Programs", in the "All Programs" interface, find the
Windows program design review notes (77 questions in total), Program Design 77Windows program design review notes (77 questions)
(Personal finishing, only do review with: D, reprinted with the source: http://blog.csdn.net/hcbbt/article/details/42706501)
Knowledge Point
What is the difference between the dubyte Charac
understand it, you will have half of the Basic Windows programming. The rest of the work is to learn functions and fill it in.
The life of a program involves three stages: birth, operation, and death ......
Birth:
Just as the entry point in the C program is the function main, the entry point of the Windows
processing program can call invalidaterectangular to invalidate the rectangle in the display area.2. When the invalidaterect function is called, if wm_paint already exists in the message queue, that is, an invalid region exists. Windows calculates a new invalid region. If the message queue does not have wm_paintA wm_paint message is delivered to the message queue.3. When the wm_paint message is received, t
such as WINAPI, PASCAL and so on. It is not required to remember how these invocation specifications are implemented at the assembly level, just need to know that they are different and presumably understand why they are different and why they cannot be mixed. 3. Understand the approximate principle of handle and resource management. This part of the requirements is relatively simple, a C language is really getting started in the previous study should have been involved in dynamic memory alloca
[Index page]
[Download source code]
Famous Android (1)-build an Android development environment and a Hello World Program in Windows
Author: webabcd
IntroductionBuild an Android development environment and write a simple sample program
Build an Android development environment in Windows
Description of the directory
ArticleDirectory
Update: 16.08.2007
Visual Studio and. net Framework make it really easy to create Windows Services. all you have to do is create a new project, select 'windows service' as your project type and you're all set. however, debugging Windows Services in Visual Studio can be a big pain. the recommended way is to use installutil to in
assembly level, just know that they are different, and presumably understand why they are different and why they cannot be mixed. 3. Understand the approximate principle of handle and resource management. This part of the requirement is relatively simple, a C language really get started students, in the previous study should have been involved in dynamic memory allocation and management, but also in some exercises to implement a similar handle in the object-oriented packaging, so when you learn
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.