开发者

What is a windowless control?

开发者 https://www.devze.com 2022-12-18 10:39 出处:网络
Under Windows their is something cal开发者_如何学Pythonled a Windowless Control. RichEdit What is a Windowless Control and what are its benefits?A Windowless control is an object that gives you th

Under Windows their is something cal开发者_如何学Pythonled a Windowless Control.

  • RichEdit

What is a Windowless Control and what are its benefits?


A Windowless control is an object that gives you the behavior of a control without requiring you to create a window.

This is useful when you want to modify or extend the behavior, or when you want to make use of the behavior in places where creating a window would be awkward or difficult.

Say, for instance, you want to imbed hundreds of rich edit controls on a page, if they were each windows, then each would have to get focus in order to get user input, and each would paint individually, etc.

But if you are willing to keep track of the locations of the windowless controls and do some other housekeeping that you would normally get for free by creating a window (i.e. routing keyboard messages), then you can get better results with lower overhead by using windowless controls.


This might be helpful.


Anon's right. It's a control that doesn't require an underlying window handle (HWND). The need for those arose especially with web browsers, since there's a limit of 10,000 max handles per process. You would open like two tabs of semi-complicated web pages and you'd run out of handles.

Working with and especially rolling your own windowless controls is hard, because at least you need to recreate their original, sometimes very complex and tricky implementation. (f.e.: IE's listbox is still windowed control because of all the tricky intricacies)


Windowless controls do not have a dedicated window handle.


in my opinion,windowless control might use less sys resource and it's easiser to customize

0

精彩评论

暂无评论...
验证码 换一张
取 消