Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Custom Theme or Style to Hide UI Elements?

16 Nov 2010   #1

Windows 7 x64
Custom Theme or Style to Hide UI Elements?

First off - great resource - it look like a great community with lots of valuable knowledge!

I've perused some of the forums and either haven't been able to form the search the way I want or the topic hasn't been touched on. I hope someone here with the experience in UI customization might either be able to answer my question or point me in the right direction.

I need to change the Windows 7 skin (Aero Theme?) to remove the power options section from the UI. (The button that shows Shut down, Log off, Restart, Hibernate, etc). (See attached picture: StartMenu.jpg)
Custom Theme or Style to Hide UI Elements?-startmenu.jpg

We want to use Windows 7 in a VDI environment and we would prefer for users to "Disconnect" - and while it is an option on the flyout menu, it cannot be set as the default for the button (using GPO or local policy/registry configuration). We have coded our own disconnect solution, but to prevent user confusion we want to eliminate the other option.
  1. Is it possible to outright eliminate UI features (such as buttons, user tile, etc) through a custom theme or style? (Possibly a compiled replacement for aero.msstyles?)
  2. If the answer to #1 is no, is there a relativly easy way to replace the shell with a duplicate that does not have these options in the UI?
  3. What tool(s) do I need to build a solution to make this change?
I've seen some pretty amazing re-skinning of the UI and thought this might be easy to do, but it seems that suppressing core OS features is not a simple task.

Thanks in advance for assistance,

My System SpecsSystem Spec
30 Nov 2010   #2

Windows 7 x64

I got an answer in the form of some C code:

int wmain(int argc, wchar_t* argv[])
    HWND hwndStart;
    HWND hwndLogoffPane;
    HWND hwndLogoffButton;
    UINT nShow = SW_HIDE;

    if (argc > 1)
        switch (_wtoi(argv[1]))
        case 0:
            nShow = SW_SHOW;

            nShow = SW_HIDE;

    hwndStart = FindWindow(L"DV2ControlHost", L"Start menu");
    if (hwndStart)
        hwndLogoffPane = FindWindowEx(hwndStart, NULL, L"DesktopLogoffPane", NULL);
        if (hwndLogoffPane)
            hwndLogoffButton = GetWindow(hwndLogoffPane, GW_CHILD);
            if (hwndLogoffButton)
                ShowWindow(hwndLogoffButton, nShow);

    return 0;
Good luck :)
My System SpecsSystem Spec

 Custom Theme or Style to Hide UI Elements?

Thread Tools

Similar help and support threads
Thread Forum
Windows changes to basic theme when trying to apply custom theme
So, I recently reinstalled my Windows 7 and tried to install custom themepack I had before, but instead of applying it Windows just changes it's theme to basic. Before the re-installation everything worked fine. I didn't even have to patch system files to apply custom theme. I tried repairing...
Themes and Styles
Custom visual style theme not working, only shows Basic themes?
Every time I switch from one of the original Aero themes into a custom theme with visual styles, it turns into a Windows Basic theme? I can back to Aero fine, but switching into the same custom theme will only show the basic theme.
Themes and Styles
Can't change back to custom theme from classic theme w/o restarting
Windows 7 Ultimate x64 SP1 Hello. I've recently reformatted my computer and since then I've been having this rather annoying problem. When I select classic theme from the personalization menu then try to switch back to my custom theme, the only thing that changes is the color scheme but nothing...
How do I remove custom theme, and custom icons?
Hello, I installed a custom theme and custom icons some months ago. I don't like it anymore, and would just like to go back to the good old windows 7. How do I do that? Cad
Themes and Styles
Using a custom theme leaves me with Classic theme
I just got a new PC and I want to use a custom theme on it (I absolutely hate the default aero theme, especially after using a much nicer version of it for years on my old PC). I download a theme. I use the UniversalThemePatcher (the 64-bit version since that is the one I have) to patch the 3...
Themes and Styles

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:27.
Twitter Facebook Google+