Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Task Bar button

I have the following problem :
I want to remove task bar button from system task bar ( Win95 & NT 4.0 ) during runtime. If I hide the application main window, the button disapears, but I want to do it without hideing the window. It is easy when you crate window, because you can set style to WS_EX_TOOLWINDOW,
but ModifyStyleEx function ( MFC ) doesn't work when the window is already shown. How to remove that button then ?

Please help me.

0
lizer
Asked:
lizer
  • 2
  • 2
1 Solution
 
chensuCommented:
Try the following code in your frame window:

this->ShowWindow(SW_HIDE);
this->ModifyStyleEx(WS_EX_APPWINDOW, WS_EX_TOOLWINDOW,
                    SWP_DRAWFRAME | SWP_FRAMECHANGED);
this->ShowWindow(SW_SHOW);

0
 
lizerAuthor Commented:
Thanks for advise.
It works, but it is not everything I wanted. I got few frame windows ( only one active ) but I want only one of them to be visible on task bar and also on task switcher. One window ( main ) should be always on task bar and other should appear on task switcher only when they are active, but when they have WS_EX_TOOLWINDOW style they won't appear on task switcher. How to do it then ?

Marcin L.
0
 
chensuCommented:
So, you mean you would like the window to appear on task switcher but not no task bar. As far as I know, you have to remove the title bar of that window.
0
 
lizerAuthor Commented:
OK but I want my titles. Thank for advise anyway.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now