very early wanted to write about C + + UI development of a series of blog posts, just after the review of the blogs, began to brush blog post, can not live up to their own blood, I am not a master of writing interface, just want to write blog to improve my own technical accumulation, but also help you solve the interface development bottlenecks.
Can come here to see me write articles,
The first note is that you are a programmer under Windows development!
Second, you are interested in the development of beautiful software interface!
Third, maybe you are as I did at the beginning of the C + + software interface development at a loss! Maybe I'm not professional, but I just want to make use of C + + programming Client interface of the novice programmers have no misunderstanding of C + + interface development.
I was born from Windows development and knew how fucked up we were when we wanted to develop the interface with C + +, looking back at our familiar MFC WIN32SDK
, made out of the interface is so ugly, compared to those beautiful software on the Internet, our software suddenly appear low grade. Software interface technology is not very advanced, it is not difficult, as long as the right path is easy to get started. Although it seems simple to say, it is really tedious and complex to write, and you need to be able to write a C + + UI for Windows Messaging as well.
First of all, say a few ways to write the interface under Windows:
The first form of interface development
Based on the Windows control of self-painting, I believe that many programmers have heard the MFC self-painting and other terms, it does not write poorly written, in fact, the reason why MFC is not good understanding, the real term should be called Win32 interface self-painting to prevent beginners into the wrong, because MFC is encapsulated Win32 API, So MFC interface self-painting is the Win32 interface self-painting. The principle is probably that we intercept the Windows drawing interface, and then we draw the interface instead of him to implement our custom interface. Many skin libraries use hook technology to intercept Windows UI messages and then switch to the overall UI style, such as skinmagic, the skin library. This method is suitable for people who write the library to play, the relatively high degree of difficulty, to the Windows message is familiar. But it doesn't matter. I'll analyze the implementation of all Windows controls and message handling and self-painting in subsequent articles.
The second type of interface development
What is Directui technology based on the interface of Directui technology? We know that in MFC our software interface has a handle, and the handle is a system resource.
But the interface component based on DIRECTUI technology has no handle, we need to encapsulate a large number of mouse messages and so on instead of the default Windows control messages.
Let's just say, join you. To draw a button with Directui technology then you need to implement some of the state of the system button yourself. For example, the mouse click Hover unhover Disable when the button and the processing of the message. Because now you are not using the Windows default message mechanism to implement the interface. All messages you package yourself.
Although the Directui technique is a non-handle drawing component, all DIRECTUI interfaces must have a hosting window to use as a render window, because your drawing requires a device context.
There are a lot of windows can replace the cumbersome interface development, follow-up will specifically explain how to write the interface below
Qt GUI and QML can quickly develop the software interface, but there is a drawback is that the package may be some big, but the development efficiency is really high this is my good at the end of the detailed introduction of the QML development cross-platform Interface UI
Duilib domestic interface library such as Jinshan Baidu some of the products used in this library, in addition to some small bugs not much of the shortcomings of the late will be introduced in the article
skin++ a fee for the interface library, due to the fee technology is not shared not suitable for us to learn to use Direct X out
The development of the interface will follow the following sequence:
1, step by step learning Win32 SDK and MFC through self-painted implementation of the interface DIY series 1.1 self-painted button buttons 1.2 self-Painted dialog 1.3 Self-Drawing menu
1.4 Self-painted input box 1.5 self-drawn ComboBox 1.6 self-drawn listview 1.7 Self-Drawing tab
1.8 Self-painted ScrollBar 1.9 interface self-painting via hooks
2. Directui way to develop custom software interface component series based on GDI +
2.1 GDI + Getting Started 2.2 GDI + implementation Directui series
3, QT under the interface Development series
· 4. Duilib Rapid Development Interface Series
The above is my list of things I want to write, writing blog is actually very dull, busy work can not be updated every day but at least to ensure that two to three times a week to update the blog post, may write the skill level is not in the eyes of Daniel, but for the novice can help quickly enter the interface development threshold so enough. ~
Attach the recently written test interface
Windows VC Interface DIY Series 1----written to C + + programmers who want to write interface