Duilib Tutorial-Non-DUI controls

Source: Internet
Author: User

Duilib is not really a DUI, at least some of the controls are not fully DUI. Actually includes:

1.EDIT.

Its implementation principle is that Ceditui contains a window ceditwnd, the process is as follows:

1) mouse click, Create window See EditUI.cpp line No. 217, in line No. 223 There is the code created:

New Ceditwnd (); ASSERT (M_pwindow); M_pwindow->init (this);

2) When losing focus, delete yourself, see EditUI.cpp lines 103th and 131th,

LRESULT Ceditwnd::onkillfocus (UINT umsg, WPARAM WPARAM, LPARAM LPARAM, bool& bhandled) {     = ::D Efwindowproc (M_hwnd, umsg, WParam, LParam);    PostMessage (wm_close);     return lres;}

Here, we also notice that it does not send a killfocus message to the parent window, just simply shuts itself down.

2.RICHEDIT

This control is a bit complicated, I didn't look closely, but I probably know that it is using COM components to implement Scroll_bar. Interested students can study.

3.COMBOBOX

At this point the non-DUI part mainly refers to the bounce out of the dropdown box, it is using an HWND, and then this HWND using DUI way to implement. It is implemented in a similar way to edit.

This control also has a bug, that is, when the drop-down box bounces out, when scrolling the mouse wheel, the drop-down box will automatically disappear, the equivalent of it does not support the mouse wheel.

Finally, of course, strictly speaking, FLASH, WEBBROWSER, ActiveX and other controls are not pure DUI control, but the implementation of the difficulty is too large, with ready-made. But WebBrowser really should not use Microsoft's WebBrowser control, because Microsoft's control is really weak, the HTML of a variety of unsupported, including CSS, JAVASCRIPT, not to mention HTML5. Consider adding WebKit or Firefox to the inside, so the support for the web is pretty perfect.

Ps:

Recently has been engaged in mobile phone software, no time to update the blog.

Here again in the building, inadvertently put my network cable broke, not on the net, and then finally have time to write a blog.

I switched to the telecom network and found that I couldn't get to GitHub.

I changed the WIN8.1 system, and then found that can not install VMS, there is a bunch of green software can not be used.

"The Analects of Confucius" read 1.5 have not finished reading, i le a go ...

It's really a bad thing.

Duilib Tutorial-Non-DUI controls

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.