Win32: Comment masquer les fenêtres tierces dans la barre des tâches par hWnd
- Je masquer les fenêtres pop-up dans la troisième partie de la bibliothèque.
J'ai mis en place windows crochet trucs avec SetWindowsHookEx et tout savoir de la newely créé hWnd(s). J'écoute HSHELL_WINDOWCREATED
de rappel et de faire ce qui suit:
long style= GetWindowLong(hWnd, GWL_STYLE);
style &= ~(WS_VISIBLE); //this works - window become invisible
style |= WS_EX_TOOLWINDOW; //flags don't work - windows remains in taskbar
style &= ~(WS_EX_APPWINDOW);
SetWindowLong(hWnd, GWL_STYLE, style);
Ce que je fais de mal pour cacher newely créé de windows dans la barre des tâches?
source d'informationauteur Andrew Florko
Vous devez vous connecter pour publier un commentaire.
Avant d'utiliser
SetWindowLong
appelShowWindow(hWnd, SW_HIDE)
puis d'appelerSetWindowLong
puis d'appelerShowWindow
de nouveau commeShowWindow(hWnd, SW_SHOW)
. Ainsi, votre code devrait ressembler à ceci:Voici une citation de Le Site web de Microsoft:
Vous devez utiliser GWL_EXSTYLE pour obtenir/définir l'EX-drapeaux, GWL_STYLE ne fonctionnera pas pour les anciens drapeaux.