Estoy realizando unas pruebas y me encuentro en la siguiente situacion
Creo una ventana MDI
Abro una ventana child dentro de la ventana MDI y en esta ventana creo un dialogo con un folder
Si realizo un cambio de pestaña y despues pulso la tecla ESCAPE, el dialogo se oculta.
Alguna idea
Gracias
Pongo un ejemplo
- Code: Select all Expand view
#include "fivewin.ch"
function main()
Local oWnd
DEFINE WINDOW oWnd TITLE "PRUEBA" MDI ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd
return nil
STATIC FUNCTION BuildMENU(oWnd)
LOCAL OMENU
MENU oMenu
MENUITEM "Prueba1" ACTION Prueba1(oWnd)
MENUITEM "Salir" ACTION oWnd:End()
ENDMENU
RETURN oMenu
STATIC FUNCTION Prueba1(oWnd)
Local oChild, oDlg
DEFINE WINDOW oChild FROM 0, 0 TO 480, 900 PIXEL;
COLOR NIL, CLR_HGREEN ;
TITLE "TTITULO" NOMAXIMIZE MDICHILD ;
OF oWnd
oChild:bRClicked := {|nRow, nCol| Reactivar(oDlg) }
oDlg:= CrearDialogo(oWnd, oChild)
ACTIVATE DIALOG oDlg NOWAIT valid .f.
ACTIVATE WINDOW oChild
RETURN NIL
STATIC FUNCTION CrearDialogo(oWnd, oChild)
Local oDlg, oFld
DEFINE DIALOG oDlg RESOURCE "FLD0" OF oChild ;
COLOR NIL, CLR_YELLOW
REDEFINE FOLDER oFld ID 400 OF oDlg ;
COLOR NIL, CLR_CYAN;
PROMPT "General", "Configuración", "Horarios" ;
DIALOGS "FLD1", "FLD2", "FLD3"
RETURN oDlg
STATIC FUNCTION Reactivar(oDlg)
oDlg:Show()
RETURN NIL
Este es el fichero de recursos
- Code: Select all Expand view
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".
//#include <windows.h>
//#include <commctrl.h>
//#include <richedit.h>
LANGUAGE LANG_SPANISH,SUBLANG_SPANISH_MODERN
FLD0 DIALOG DISCARDABLE 0, 0, 488, 209
STYLE WS_CHILD|WS_VISIBLE
FONT 9, "ARIAL"
{
CONTROL "123456", 201, "Edit", ES_MULTILINE|WS_BORDER|WS_TABSTOP, 67, 4, 32, 12
CONTROL "1234567890123456789012345", 202, "Edit", ES_MULTILINE|WS_BORDER|WS_TABSTOP, 65, 20, 221, 12
CONTROL "Estado", 100, "Static", SS_CENTER|WS_GROUP, 288, 1, 195, 15
CONTROL "Código:", -1, "Static", SS_RIGHT|WS_GROUP, 5, 6, 53, 8
CONTROL "", 400, "SysTabControl32", 0x00000000, 2, 35, 480, 146
CONTROL "Descripción:", -1, "Static", SS_RIGHT|WS_GROUP, 5, 22, 53, 8
}
FLD1 DIALOG DISCARDABLE 31, 109, 480, 130
STYLE WS_CHILD|WS_VISIBLE
FONT 9, "ARIAL"
{
CONTROL "DUANTE CUANTO TIEMPO TENDRE QUE ESTAR AQUI", 203, "Edit", ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 67, 17, 280, 13
CONTROL "123456.77", 204, "Edit", ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 67, 32, 32, 13
CONTROL "123456.77", 205, "Edit", ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 67, 47, 195, 13
}
FLD2 DIALOG DISCARDABLE 31, 109, 480, 130
STYLE WS_CHILD|WS_VISIBLE
FONT 9, "ARIAL"
{
CONTROL "15", 216, "Edit", ES_CENTER|ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 428, 52, 27, 13
CONTROL "30", 217, "Edit", ES_CENTER|ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 428, 67, 27, 13
CONTROL "30", 218, "Edit", ES_CENTER|ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 428, 82, 27, 13
CONTROL "", 4013, "Button", BS_GROUPBOX, 360, 46, 104, 53
CONTROL "Ajuste Entrada:", 4015, "Static", SS_RIGHT|WS_GROUP, 367, 54, 57, 8
CONTROL "Ajuste Salida:", 4016, "Static", SS_RIGHT|WS_GROUP, 367, 69, 57, 8
CONTROL "Ajuste Total:", 4028, "Static", SS_RIGHT|WS_GROUP, 367, 84, 57, 8
}
FLD3 DIALOG DISCARDABLE 31, 109, 480, 130
STYLE WS_CHILD|WS_VISIBLE
FONT 9, "ARIAL"
{
CONTROL "123456", 231, "Edit", ES_CENTER|ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 47, 16, 34, 13
CONTROL "", 232, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_TABSTOP, 178, 15, 38, 59
CONTROL "DUANTE CUANTO TIEMPO TENDRE QUE ESTAR AQUI", 233, "Edit", ES_NOHIDESEL|ES_WANTRETURN|WS_BORDER|WS_TABSTOP, 46, 32, 246, 13
CONTROL "Horario 2:", 4034, "Static", SS_RIGHT|WS_GROUP, 6, 63, 36, 8
}