Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Additional WindowStyle: HideInTaskbar


Recommended Posts

Don't know if this is needed for other os than windows but if you create a child window it might be useful to not show it in the taskbar like for tooltips or like UAK does it with the combobox. A hack to achieve this is doing the following:

_window = CreateWindow("", 0, 0, 0, 0, displays[0], WindowStyles::WINDOW_HIDDEN | WindowStyles::WINDOW_CHILD);
SetWindowLongA(_window->GetHandle(), GWL_EXSTYLE, (GetWindowLong(_window->GetHandle(), GWL_EXSTYLE) | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
   

 

Link to post
Share on other sites

Give this a try:

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    //Get the display
    auto displays = GetDisplays();
    Vec2 displayscale = displays[0]->GetScale();

    //Create a window
    auto style = WINDOW_TITLEBAR | WINDOW_RESIZABLE;
    auto window = CreateWindow("Example", 0, 0, 400, 300, displays[0], style);
    auto child = CreateWindow("Child", 100, 100, 400, 300, window, style | WINDOW_TITLEBAR);

    //Main loop
    while (window->Closed() == false)
    {
        if (window->KeyDown(KEY_ESCAPE)) break;
    }
    return 0;
}

 

  • Thanks 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...