ButtonBmp + Escape
Posted: Thu Dec 20, 2012 4:40 pm
Amigos todos,
Tengo un pequeño inconveniente con los botones BUTTONBMP y la tecla ESCAPE, en ambiente MDI utilizando dialogs NOWAIT incrustados en MdiChilds.
He condicionado la salida (odlg y Child) mediante GetKeyState(VK_ESCAPE) y me funciona correctamente.
Ahora bien, si el focus lo tiene cualquier objeto que no sea ButtonBmp, la condición trabaja bien. Pero si el usuario hace click sobre cualquier ButtonBmp y i suelta la tecla del ratón fuera del botón, quedando el foco en este, y luego presiona escape, se dispara la acción de la tecla escape y solo cierra el dialog, quedando activa la child. Es decir, si cualquier BUTTONBMP tiene el foco y se oprime la tecla escape, la condición dada con GetKeyState(VK_ESCAPE) se irrespeta, y únicamente cierra el dialog.
¿Alguno de ustedes experimentado este problema? ¿Tiene la solución?
Agradezco de antemano cualquier comentario al respecto. Utilizo Fwh1204-xHarbour-PellesC
Saludos.
Tengo un pequeño inconveniente con los botones BUTTONBMP y la tecla ESCAPE, en ambiente MDI utilizando dialogs NOWAIT incrustados en MdiChilds.
He condicionado la salida (odlg y Child) mediante GetKeyState(VK_ESCAPE) y me funciona correctamente.
Ahora bien, si el focus lo tiene cualquier objeto que no sea ButtonBmp, la condición trabaja bien. Pero si el usuario hace click sobre cualquier ButtonBmp y i suelta la tecla del ratón fuera del botón, quedando el foco en este, y luego presiona escape, se dispara la acción de la tecla escape y solo cierra el dialog, quedando activa la child. Es decir, si cualquier BUTTONBMP tiene el foco y se oprime la tecla escape, la condición dada con GetKeyState(VK_ESCAPE) se irrespeta, y únicamente cierra el dialog.
¿Alguno de ustedes experimentado este problema? ¿Tiene la solución?
Agradezco de antemano cualquier comentario al respecto. Utilizo Fwh1204-xHarbour-PellesC
Saludos.