3

Possible Duplicate:
Windows Taskbar API
Win32: How to hide 3rd party windows in taskbar by hWnd

How can I prevent window from showing in the taskbar after I created it with CreateWindow? (Is there any parameter that allows me to do this, or something?)

Community
  • 1
  • 1
user1169770
  • 45
  • 1
  • 6
  • 1
    @awoodland I disagree, the outcome is the same but the question is different, as is the answer. – Liam M Jan 27 '12 at 18:12
  • @LiamM - I thought the answer addressed both cases with the quote from MSDN. The "possible duplicate" message just means it's been put up for a vote though. – Flexo Jan 27 '12 at 18:14
  • @awoodland ah, fair enough, I'm not 100% on how this place works yet. – Liam M Jan 27 '12 at 18:17

2 Answers2

5

set 'dwStyle' to WS_POPUP, the third argument:

HWND WINAPI CreateWindow(
    __in_opt  LPCTSTR lpClassName,
    __in_opt  LPCTSTR lpWindowName,
    __in      DWORD dwStyle,
    __in      int x,
    __in      int y,
    __in      int nWidth,
    __in      int nHeight,
    __in_opt  HWND hWndParent,
    __in_opt  HMENU hMenu,
    __in_opt  HINSTANCE hInstance,
    __in_opt  LPVOID lpParam);

If you're doing win32, I suggest, for your own sanity, you give Qt a try.

zwcloud
  • 4,546
  • 3
  • 40
  • 69
Liam M
  • 5,306
  • 4
  • 39
  • 55
1

ITaskbarList::DeleteTab will also remove a window from the taskbar.

ChrisV
  • 3,363
  • 16
  • 19
  • Not always. When creating the window with WS_POPUP it works only on Win7. – Bagelzone Ha'bonè Dec 27 '12 at 11:54
  • Take my upvote. I have a scenario where I'm overlapping two windows (rendering some content on top-one & remaining on the bottom one) & this is best solution. `WS_POPUP` or any other style modification to the underlying window was not good. – Hitesh Kumar Saini Mar 17 '22 at 10:08