Antonio,
Con las nuevas librerías funciona perfectamente.
Gracias por la correción a la hora de definir un bitmap.
Con esto ya sólo me quedan 3 problemillas:
1.- El dibujo inicial del dialogo.
2.- pulsar esc teniendo el foco un campo CheckBox, DtPiker, TmPicker, RadMenu y no se si hay mas (Ademas he probado get y combobox y va bien)
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oWnd
Define Window oWnd Title "Principal" Mdi
oWnd:bInit := {|| ps_Child(oWnd) }
Activate Window oWnd MAXIMIZED Valid MsgYesNo('Desea salir')
return nil
static proc ps_Child( oWnd )
local oChild
Define Window oChild MdiChild Title 'Child' of oWnd
Activate Window oChild On Init ps_Dialog(oChild)
return
static proc ps_Dialog( oChild )
local oDlg, oBrush, aGet[4], aVar[4]
local oCheck, lCheck
oBrush := tbrush():New(, nRgb(224, 236, 255) )
DEFINE DIALOG oDlg Resource "Dialogo" OF oChild TRANSPARENT Brush oBrush
Redefine CheckBox oCheck Var lCheck Id 106 Update Of oDlg
aVar[1] := space(2)
Redefine Get aGet[1] Var aVar[1] Id 102 Update Message 'Indique el código del usuario' Of oDlg
aVar[2] := space(50)
Redefine Get aGet[2] Var aVar[2] Id 103 Update Message 'Indique el nombre del usuario' Of oDlg
aVar[3] := space(50)
Redefine Get aGet[3] Var aVar[3] Id 104 Update Message 'Indique el código de la empresa' Of oDlg
aVar[4] := space(50)
Redefine Get aGet[4] Var aVar[4] Id 105 Update Message 'Indique el nombre de la empresa' Of oDlg
ReDefine Button Id 2 Of oDlg Action oDlg:End()
ACTIVATE DIALOG oDlg NoWait On Init ps_Incrus( oChild, oDlg ) Valid .F.
return
static proc ps_Incrus(oChild, oDlg)
local nWidth, nHeight
oDlg:Move(0, 0,,, .T.)
nWidth := oDlg:nWidth + 7
nHeight := oDlg:nHeight + 33
oChild:SetSize(nWidth, nHeight, .T.)
oChild:Center()
return
Code: Select all | Expand
DIALOGO DIALOG DISCARDABLE 0, 0, 305, 80
STYLE WS_CHILD|WS_VISIBLE
FONT 8, "MS Sans Serif"
{
CONTROL "123", 102, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 86, 20, 39, 12
CONTROL "123456", 103, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 133, 20, 146, 12
CONTROL "12", 104, "Edit", WS_BORDER|WS_TABSTOP, 86, 48, 32, 12
CONTROL "1", 105, "Edit", WS_BORDER|WS_TABSTOP, 133, 48, 105, 12
CONTROL "Usuario:", -1, "Static", SS_CENTERIMAGE|WS_GROUP, 47, 22, 31, 12
CONTROL "Empresa:", -1, "Static", SS_CENTERIMAGE|WS_GROUP, 47, 50, 31, 12
CONTROL "Check-box", 106, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 100, 65, 48, 10
}
3.- CTRL+V sobre el campo aget[1] (102) que esta definido a 2 caracteres. avar[1] := space(2)
Copiamos al clipboar la palabra hola y la pegamos en el get[1] definido a space(2).
El resultado del get[1] es "hola " (hola + los 2 espacios iniciales)