Home > Software engineering >  Why do chrome/visual studio code/edge all have the same classname "Chrome_WidgetWin_1"?
Why do chrome/visual studio code/edge all have the same classname "Chrome_WidgetWin_1"?

Time:09-18

I tried to enumerate all Win32 children of the Desktop handle, then tried to print out each child's class name using GetClassNameW(childHandle).

The chrome browser's class name is "Chrome_WidgetWin_1". However, the Edge browser's class name and Visual Studio Code's class name are also "Chrome_WidgetWin_1".

Why is that so? Why does Microsoft decide to use the same class name as Chrome for them?

CodePudding user response:

Window classes registered without CS_GLOBALCLASS in different processes are technically not the same classes even though the names might be the same.

These class names are internal details that you should not rely on but in this case they are the same because they are all using Chromium based browsers to drive their UI. Visual Studio Code is an Electron app (uses Chromium) and it is well known that Edge changed from custom Microsoft code to Chromium.

  • Related