Jump to content

Recommended Posts

Posted

I have always been aware of this tool but never really gave it a try until today. I am amazed at how comprehensive this really is.

I use System Informer (previously Process Hacker) almost daily for many things. Especially checking window hierarchy, styles, etc. It does a great job of showing window hierarchy, grouped by parent windows and so on.

But this AutoIt tool here is a real gem! It covers way more styles and extended styles in comparison to System Informer. I may switch to using this Control Viewer on a regular basis now and put some work in here.

I am thankful to @pixelsearch, @argumentum and anyone else who has contributed to keeping @Yashied's program going and updating styles/exstyles and so on.

It would be good to get some dark theme and DPI going here. I see the _WinAPI_DPI UDF in there as well so it would be good if we can add that to the CV.ini config and menus to enable/disable. I will see if there is anything that I can contribute here as I get more accustomed to using this program.

Posted

if any of you have the time, make a group chat with  @WildByDesign, @pixelsearch, @ioa747 ( and me ) and attend to it. That way we can keep it in this thread and not have many independent versions floating around. If later a user want to exit the chat, that user can just leave the conversation.
This is a good way to not stagnate the tool because "the maintainer will not update it" ;) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

  • 3 weeks later...
Posted

If anyone prefers a Dark Theme variant of this incredible Control Viewer tool, I have applied the GUIDarkTheme UDF to the latest Control Viewer version and will share it here.

Control Viewer GUI initially had some problems with the UDF, particularly tab control related. So this actually led to numerous important fixes for the UDF. Also, it led to adding support for the tab icons/images as well.

Enjoy! 🌒

ControlViewer(source v0.2024.9.16)-Dark.zip

Posted

@pixelsearch Hello, I hope you are doing fantastic. :)

How do you go about finding missing style values to add to Control Viewer?

For example, if you run the _ChooseFont() function to bring up the Font dialog:

The 3 Edit boxes at the top which are child windows to the ComboBox show:

CLASS:Edit
0x00000200, ES_AUTOHSCROLL, ES_NOHIDESEL, WS_CHILD, WS_VISIBLE

The 3 ComboLBox windows right below are also child windows to the ComboBox and shows always because of $CBS_SIMPLE. They show:

CLASS:ComboLBox
0x00009053, WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, WS_VSCROLL

I'm just not sure how to figure out the missing styles. I've checked briefly on MSDN and GitHub (usually GitHub search is most helpful to me for styles), but I do not see a 0x00000200 specifically for Edit so the style must come from elsewhere.

The ComboLBox value 0x00009053, I assume, must be a combination of multiple styles. Or at least that is my guess and therefore I don't even know where to start with that one.

If you are able to show me your methods for finding missing styles, then I can fill in and update any other missing styles that I find in the future.

Posted

Hey @WildByDesign everything is fine, thanks !

1) Concerning the remaning styles 0x00009053 in class ComboLBox of _ChooseFont() function :
It seems correctly splitted with my version of Yashied's control viewer as shown in this pic :

ComboBoxsimple(childwindowComboLBox).png.f2863e7988b61a72a77c9f3320a60227.png

This is because of the change I mentioned in the current thread, here, to indicate that a ComboLBox got its styles from the ListBox styles. If I understood Comboxes correctly, the list is always displayed only for 1 type of ComboBox control, i.e. the Simple ComboBox that got the CBS_SIMPLE style :

3typesofComBoBox.png.cb36020b58fb617764d1d55828df79b0.png

For the 2 other types of ComboBox (DropDown Combo & DropDownList Combo), then the ComboLBox control is no more a child of the ComboBox control but a separate top-level window constantly recreated when you click on the icon (the down arrow) placed at the right of the 'Edit' field (which is btw an Edit field only for Simple ComboBox (1) and DropDown Combo (2) but not for DropDownList Combo (3) where you can't Edit anything, only pick)

2) Concerning the remaning 0x00000200 in class Edit of _ChooseFont() function :
They appear also for me as you can see in the following pic :

ComboBoxsimple(childwindowEdit).png.0924953e842170ba0ed729e8a2253895.png


I don't think you'll find anything for it on the Internet, except :
* on this Korean webpage , where we read this :

CBS_HASSTRINGS = ES_HASSTRINGS (Has strings)

* on this AutoIt webpage where I asked the question a few years ago.

Concerning 0x0200 missing style in the Edit control, here is a chat I had one month ago with AI (Google then GPT-5.4 nano)

My question to Google AI :
==========================
Hey Google,I read on a webpage that CBS_HASSTRINGS = ES_HASSTRINGS, meaning is Has strings . Value is 0x0200 . As I got myself a surprising 0x0200 undocumented style found as part of the edit control of a combobox, I wondered why this info of ES_HASSTRINGS = 0x0200 isn t found anywhere else, except on the webpage ?


Google AI answer :
================
The 0x0200 style you discovered in a Win32 ComboBox edit control highlights a classic quirk in Microsoft's documentation regarding CBS_HASSTRINGS and ES_HASSTRINGS:

1. Why You Only Saw It on One Webpage
-------------------------------------
The Win32 API header files (Winuser.h) share numeric constants across different control types. The value 0x0200 simply means "has strings" to the OS, regardless of where it is applied. 

    For a Combo Box, this constant is CBS_HASSTRINGS. [perso: 0x0200]
    For a List Box, it is LBS_HASSTRINGS. [perso: 0x0040]
    For an Edit Control, it was never meant to apply, which is why official Microsoft documentation does not list it under ES_HASSTRINGS styles. 

The webpage you read was likely mapping numerical constants back to human-readable names through decompilation or header inspection. It’s an undocumented overlap because Windows didn't need to create a new unique number for every single variation of "Has Strings."

2. Why You Found It on a ComboBox
---------------------------------
A ComboBox in Win32 is actually a composite control made up of two sub-windows: a list box and an edit control. When you create a ComboBox with CBS_DROPDOWN (which includes the edit field), the underlying framework copies certain styles from the ComboBox parent and passes them down to configure its internal child windows. 
The CBS_HASSTRINGS flag gets inherently forwarded to the internal edit control’s style masks, showing up as 0x0200 during runtime inspections.

3. What It Does in the Edit Control
-----------------------------------
Even though the edit control is theoretically unaware of LBS_HASSTRINGS or CBS_HASSTRINGS, it evaluates the 0x0200 bit contextually.

    In the internal edit control, 0x0200 overlaps with WS_MINIMIZEBOX. Since an edit control cannot be minimized, the OS ignores the style entirely.
    It does not change how the edit box handles text. The text-handling logic for the ComboBox's edit field relies on the parent's CBS_DROPDOWN behavior.

Because this shared value is a harmless artifact of internal window creation, Microsoft leaves it undocumented rather than cluttering official API guidelines with overlap details.


GPT-5.4 nano:
============
That Google AI exchange is **not reliable**.

- There is **no documented `ES_HASSTRINGS`** window style for the standard Win32 **EDIT** control in `Winuser.h`. The “0x0200 = ES_HASSTRINGS” claim is almost certainly a **constant-mapping mistake** from that webpage.

- In your case, the edit child’s style containing `0x0200` is best explained as a **bit that gets copied over during the ComboBox’s internal control creation** (or ends up there incidentally), and then the EDIT control simply **ignores** it because it doesn’t correspond to any meaningful `ES_*` style for EDIT.

So the takeaway: **`0x0200` is real for `CBS_HASSTRINGS` (ComboBox)**, but **seeing `0x0200` inside the ComboBox’s internal EDIT style doesn’t mean EDIT has an “ES_HASSTRINGS” feature**—it just means that bit landed in the EDIT’s `GWL_STYLE` value (even if the EDIT doesn’t treat it as a valid style).

For the record, here is a pic of the Simple ComboBox control (ComboBox class) :

ComBoBoxsimple(allofit).png.e401945a09246afc0fa3e8ce2592735e.png

After all, if ComboLBox class got a LBS_HASSTRINGS style (as seen in 1st pic above) and ComboBox class got a CBS_HASSTRINGS style (last pic above), why an Edit Class couldn't have an undocumented ES_HASSTRINGS :D

Anyway, let's forget this 0x0200 or we'll never end. Maybe GPT-5.4 nano is right and "the style is  copied over during the ComboBox’s internal control creation" (let's not forget that CBS_HASSTRINGS is also 0x0200)

Maybe we can "compare" this behavior with the $WS_VSCROLL style applied at combobox creation : it will be "copied" to the ComboLBox window (which is not a child window in all cases). If you don't indicate $WS_VSCROLL at the combobox creation, then the ComboLBox window won't have a vertical scrollbar, no matter the type of ComboBox you created.

3 hours ago, WildByDesign said:

ow do you go about finding missing style values to add to Control Viewer?

When it happens, I just search on the Internet (the .h files) in case a style is missing in AutoIt, no more no less.
Or ask myself : how is it possible that LBS_HASSTRINGS exists, CBS_HASSTRINGS exists (0x0200) and now we're facing the same undocumented value 0x0200 in the Edit part of the ComboBox ? Let's go try to find an undocumented "ES_HASSTRINGS" on the web !

Have a great evening :bye:

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
8 hours ago, pixelsearch said:

This is because of the change I mentioned in the current thread, here, to indicate that a ComboLBox got its styles from the ListBox styles.

That was a nice fix, thank you. It behaves perfectly for me now as well.

8 hours ago, pixelsearch said:

Concerning 0x0200 missing style in the Edit control, here is a chat I had one month ago with AI (Google then GPT-5.4 nano)

The output regarding 0x0200 that you got from AI was very helpful. It makes a lot of sense now.

I've only asked AI a single question so far. I asked it (Google Gemini) to convert a block of C++ code into AutoIt code and it did a great job. I understood some of the C++, but not all. But the greatest part for me about the AI output when it converted C++ to AutoIt was the code comments that the AI added which is what gave me the understanding of the parts of C++ that I didn't quite understand.

8 hours ago, pixelsearch said:

Let's go try to find an undocumented "ES_HASSTRINGS" on the web !

I thought for sure that I might find a few references on GitHub at least, but it returned zero matches. Some undocumented stuff on the web in general but I think that we got a decent enough understanding from your AI output for the fact that it would have been inherited from its parent window (ComboBox).

8 hours ago, pixelsearch said:

Have a great evening :bye:

You as well. Thank you. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...