What is a windowless control? What is a windowless control? windows windows

What is a windowless control?


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.


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)