Windows 10 Taskbar shows up when CD/DVD is inserted or ejected

liz08

Active Member
Joined
Oct 9, 2017
Messages
21
Hello,

In our application we get the handle of the taskbar using Windows API and hide it using SW_HIDE.
Yet when the CD / DVD is inserted / ejected the taskbar is visible.

We tried to handle the WM_DEVICECHANGE windows message which is received when any device is inserted to the system and called the windows API to hide the taskbar during this usecase.
Yet the issue is now sporadic. At times the taskbar remains hidden and at times it is unlocked and visible.

Can you please let me know what else windows message is required to be handled when CD/DVD is inserted/ejected.

Thank u.
 


Solution
Hey... WM_GETICON was causing the taskbar to show up..
This message was handled by using Windows API and hide it using SW_HIDE. The issue is no more reproducible.
You may want to google around. I recall an application someone wrote to audit the message queue. You could write your own and just see which messages are called during a disc insert. You should be using a hook to intercept messages if your not too otherwise the messages will process before you can block them.
 


I had added traces to get the windows messages! That helped me to get wm_devicechange as one the windows messages ! During eject the taskbar is successfully hidden! It is while inserting the taskbar that the issue is sporadically reproduced.. although the same message is received is received when CD is inserted.
 


I meant while inserting the CD , the issue is sporadically reproduced
 


Are you using a hook or just GetMessage to find the messages when you block them?
 


That's why it's sporadic. You need a hook to intercept everything in the queue.
 


Hello,

Found WM_DEVICECHANGE to the only message being sent by windows which is handled by our application to hide the taskbar
The issue is still reproducible.
 


Tried hook, GetMessage and spy(created MFC application, provided the handle of the mfc application window and checked for the win messages.

Through spy i got to know along with WM_DEVICECHANGE , WM_GETICON, WM_CANCELMODE, WM_ACTIVATEAPP and WM_ACTIVATETOPLEVEL also is sent by windows.
 


A hook is the only reliable way you will accomplish this. You need to intercept all messages (global) and filter out the ones and allow the rest.
 


Hey... WM_GETICON was causing the taskbar to show up..
This message was handled by using Windows API and hide it using SW_HIDE. The issue is no more reproducible.
 


Solution
Hey... WM_GETICON was causing the taskbar to show up..
This message was handled by using Windows API and hide it using SW_HIDE. The issue is no more reproducible.
 


Back
Top