How to hide the window from the "Applications" tab in the task manager?

I have a question regarding the CreateWindowEx function. I have 2 windows, a main one and a popup. I want the popup to hide everywhere. Currently, it does not appear on the taskbar, and it does not even appear on the alt + tab menu. However, this is visible on the Applications tab in the task manager. What flags do I need to use in CreateWindowEx to hide the popup?

Current code:

hHistoryWindow = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE | WS_EX_LAYERED, szAppName, L"HistoryWindow", WS_EX_TOPMOST | WS_POPUP, WIDTH, TOP, width, height, NULL, NULL, hInstance, NULL); 

I also wanted to ask if I need to release the raster resource from the โ€œstaticโ€ window before using the DestroyWindow () function? I set the image to a โ€œstaticโ€ window as follows:

 SendMessage (hStatic, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hWhiteStone); 

Is it enough to free hWhiteStone or do I need to free the handle returned by the SendMessage () function (or is this done automatically by DestroyWindow)?

Thanks for any info.

Kra

+4
source share
1 answer

Make this a child of your main window. Do this by changing the fourth last parameter to the HWND of your main window. This SHOULD make the windows treat your popup as part of the same application as your main window.

+3
source

All Articles