PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2025 → Clignoter icône dans Barre des Tâches ( FlashWindowEx )
Clignoter icône dans Barre des Tâches ( FlashWindowEx )
Iniciado por j.barbieux, 13,mar. 2019 10:51 - 7 respuestas
Publicado el 13,marzo 2019 - 10:51
Bonjour,

Voici un code trouvé sur ce forum afin de donner un effet de clignotement à une application dans la barre des tâches.

Ca fonctionne très bien sur une configuration de projet en 32bit mais ça ne marche pas du tout sur une configuration en 64bit.

Quelqu'un pourrait m'aider à adapter ce code pour du 64 bit svp ?

Merci bien

_FLASHWINFO est une structure
cbSize est un entier sans signe
hWnd est un entier système // A handle to the window to be flashed.
dwFlags est un entier // The flash status
uCount est un entier sans signe // The number of times to flash the window.
dwTimeout est un entier // The rate at which the window is to be flashed, in milliseconds. 0 pour défaut
FIN

nFLASHW_ALL est un entier = 3 // 0x00000003 // Flash both the window caption and taskbar button
nFLASHW_CAPTION est un entier = 1 // 0x00000001 // Flash the window caption
nFLASHW_TIMER est un entier = 4 // 0x00000004 // Flash continuously, until the FLASHW_STOP flag is set
nFLASHW_TIMERNOFG est un entier = 12 // 0x0000000C // Flash continuously until the window comes to the foreground
nFLASHW_TRAY est un entier = 2 // 0x00000002 // Flash the taskbar button

pfwi est un _FLASHWINFO

pfwi:cbSize = Dimension(pfwi)
pfwi:dwFlags = nFLASHW_TRAY+nFLASHW_TIMER

pfwi:dwTimeout= 0
pfwi:hWnd = Handle(FenEnExécution())

AppelDLL32("User32","FlashWindowEx",&pfwi)
Miembro registrado
2.682 mensajes
Publicado el 13,marzo 2019 - 15:19
Bonjour,

Il me semble qu'il est préférable d'utiliser des entiers système plutôt que des entiers tout court. En effet, l'entier est sur 4 octets et en 64 bits, l'entier doit être codé sur 8 octets si je ne me trompe pas.

_FLASHWINFO est une structure
cbSize est un entier système sans signe
hWnd est un entier système // A handle to the window to be flashed.
dwFlags est un entier système // The flash status
uCount est un entier système sans signe // The number of times to flash the window.
dwTimeout est un entier système // The rate at which the window is to be flashed, in milliseconds. 0 pour défaut
FIN

nFLASHW_ALL est un entier système = 3 // 0x00000003 // Flash both the window caption and taskbar button
nFLASHW_CAPTION est un entier système = 1 // 0x00000001 // Flash the window caption
nFLASHW_TIMER est un entier système = 4 // 0x00000004 // Flash continuously, until the FLASHW_STOP flag is set
nFLASHW_TIMERNOFG est un entier système = 12 // 0x0000000C // Flash continuously until the window comes to the foreground
nFLASHW_TRAY est un entier système = 2 // 0x00000002 // Flash the taskbar button

pfwi est un _FLASHWINFO

pfwi:cbSize = Dimension(pfwi)
pfwi:dwFlags = nFLASHW_TRAY+nFLASHW_TIMER

pfwi:dwTimeout= 0
pfwi:hWnd = Handle(FenEnExécution())

AppelDLL32("User32","FlashWindowEx",&pfwi)


--
Cordialement,

Philippe SAINT-BERTIN
Publicado el 14,marzo 2019 - 11:54
Bonjour,

Merci pour votre réponse, mais ça ne change rien, même après adaptation de votre code (il y avait des erreurs de déclarations).


Une autre idée ?
Miembro registrado
2.682 mensajes
Publicado el 14,marzo 2019 - 16:29
Bonjour,

Reprends le code initial et peux tu nous indiquer la valeur de retour de la fonction FlashWindowEx ?

--
Cordialement,

Philippe SAINT-BERTIN
Publicado el 01,abril 2019 - 09:00
_FLASHWINFO est une structure
cbSize est un entier sans signe
hWnd est un entier système // A handle to the window to be flashed.
dwFlags est un entier // The flash status
uCount est un entier sans signe // The number of times to flash the window.
dwTimeout est un entier // The rate at which the window is to be flashed, in milliseconds. 0 pour défaut
FIN

nFLASHW_ALL est un entier = 0x00000003 // Flash both the window caption and taskbar button
nFLASHW_CAPTION est un entier = 0x00000001 // Flash the window caption
nFLASHW_TIMER est un entier = 0x00000004 // Flash continuously, until the FLASHW_STOP flag is set
nFLASHW_TIMERNOFG est un entier = 0x0000000C // Flash continuously until the window comes to the foreground
nFLASHW_TRAY est un entier = 0x00000002 // Flash the taskbar button

pfwi est un _FLASHWINFO

pfwi:cbSize = Dimension(pfwi)
pfwi:dwFlags = nFLASHW_TRAY+nFLASHW_TIMER

pfwi:dwTimeout = 0
pfwi:hWnd = Handle(FenEnExécution())

nRes est un entier sur 8 octets = AppelDLL32("User32","FlashWindowEx",&pfwi)

nRes = 0
Publicado el 09,abril 2019 - 08:40
petit up svp.

Comment faire pour rendre compatible ce code en exécutable 64bit ?

Merci d'avance
Miembro registrado
215 mensajes
Publicado el 09,abril 2019 - 11:01
Bonjour
cbSize est un entier sur 8 octets sans signe
dwFlags est un entier sur 8 octets
Publicado el 12,abril 2019 - 11:15
Yes enfin ça marche.

Ce n'était pas grand chose effectivement.

Un tout grand merci !!