Page 2 of 3

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 2:52 pm
by Enrico Maria Giordano
Can I see a little sample PRG showing the problem, please?

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 4:22 pm
by csincuir
Enrico Maria Giordano wrote:Can I see a little sample PRG showing the problem, please?
Hola Enrico,
Este es el programa:

Code: Select all | Expand

DEFINE FONT oFont NAME "TIME NEW ROMAN" SIZE 0,-14 BOLD ITALIC

DEFINE BRUSH oBrush RESOURCE "Grad01"

DEFINE DIALOG oDlg RESOURCE "Acceso"  ;
          TRANSPARENT BRUSH oBrush ;
          TITLE " Ingreso al Sistema SEM "+cSemVer+::cVersion  ;
          HELPID "UsuarioyContraseña"

       REDEFINE GET oGet VAR ::oPara:cUser ID 11 OF oDlg PICTURE "@K" ;
                CUEBANNER "Ingrese su nombre de Usuario..."  //BITMAP "note2" ACTION VerificaHuella(.t.)
               
       REDEFINE GET oPass VAR ::oPara:cPass ID 12 OF oDlg PICTURE "@K" ACTION (oPass:lPassword := .f., oPass:Refresh(), SysWait(0.7), oPass:lPassword := .t., oPass:Refresh() ) ;
             CUEBANNER "Ingrese su Contraseña..."  BITMAP "search"

       REDEFINE BUTTONBMP ID 210 OF oDlg  RESOURCE "note2" TEXTTOP ACTION ::VerUser(oDlg, ::oPara:nServer, ::oPara:nTipoAutentica, ::oPara:cDsn, oGet, .t. )
       
       oPass:lBtnTransparent := .t.      
       oPass:lPassword := .t.

   REDEFINE BTNBMP ID 201 OF oDlg RESOURCE "Empresas" ;
               ACTION Host( cServer, aServer, cTipo, aTipo)
   
   REDEFINE BUTTON ID 20 ACTION ::VerUser(oDlg, ::oPara:nServer, ::oPara:nTipoAutentica, ::oPara:cDsn, oGet,, .t., nAcces  ) CANCEL

    REDEFINE XIMAGE oBmp ID 501 OF oDlg RESOURCE "TSSEM" 

    REDEFINE SAY PROMPT ::cRev ID 5 OF oDlg UPDATE FONT oFont  COLOR RGB(0,0,200)

    REDEFINE BUTTON ID 21 ACTION  oDlg:End() CANCEL


ACTIVATE DIALOG oDlg CENTER

oFont:end()
oBrush:End()

RETURN .t
 
Y este es el archivo .rc que tiene la imagen:

Code: Select all | Expand

//
// Bitmap resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
TSSEM              10             "logosemt.png"

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
GRAD01             BITMAP         "gradien2.bmp"

//
// Icon resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
ICONSIS            ICON           "semicon.ico"
Saludos cordiales.

Carlos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 4:43 pm
by karinha
Carlos, aguarde, haciendo un ejemplo simples de usar.

Regards, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 4:58 pm
by csincuir
karinha wrote:Carlos, aguarde, haciendo un ejemplo simples de usar.

Regards, saludos.
Gracias Karinha.

Te comento, con Antonio ya nos dimos cuenta que el problema es que se esta activando la DATA lHtml del Método SAVE de la clase "TGdiPlus.prg"
Si antes del "ACTIVATE DIALOG oDlg" le colocamos oDlg:lHtml := .f. funciona todo correctamente.

Ahora será de averiguar porque se esta activando esta DATA

Gracias por estar pendientes de mi problema.

Saludos cordiales.

Carlos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 4:59 pm
by karinha

Code: Select all | Expand

// C:\SINCUIR

#include "FiveWin.ch"

#define RT_RCDATA 10

FUNCTION Main()

   LOCAL oDlg, oHand, oBmp1, oBmp2, oSaida, oFont

   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD

   DEFINE DIALOG oDlg RESOURCE "CSINCUIR" FONT oFont

   oDlg:lHelpIcon := .F.

   // usando .JPG directo del HD
   // REDEFINE IMAGE oBmp1 ID 501 OF oDlg FILENAME ".\olga1.jpg" // ok

   REDEFINE IMAGE oBmp1 ID 501 OF oDlg   // Usando .JPG from Resource. OLGA1.jpg

   IF Len( cJpg := cResToStr( "OLGA1", RT_RCDATA ) ) != 0

      oBmp1:LoadFromMemory( cJpg )

   ENDIF

   REDEFINE IMAGE oBmp2 ID 502 OF oDlg // Usando .PNG from Resource. TSEM.png

   IF Len( cJpg := cResToStr( "TSEM", RT_RCDATA ) ) != 0  // Usando .PNG

      oBmp2:LoadFromMemory( cJpg )

   ENDIF

   REDEFINE BUTTONBMP oSaida ID 301 OF oDlg ;
      ACTION( oDlg:End() ) CANCEL

   oSaida:cTooltip :={ "Click no Botão Para Sair",                           ;
                       "Saida - Exit - Cancelar ", 1, CLR_WHITE, CLR_HBLUE }

   ACTIVATE DIALOG oDlg CENTERED

   oFont:End()

RETURN NIL

// fin / end
 
Regards, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 5:00 pm
by karinha
Archivo .RC

Code: Select all | Expand

#ifdef __FLAT__
   1 24 ".\Windows10.Manifest"
#endif

#define RT_RCDATA 10

TSEM RT_RCDATA NONDISCARDABLE ".\TSEM.png"

OLGA1 RT_RCDATA NONDISCARDABLE ".\OLGA1.jpg"

CSINCUIR DIALOG 36, 93, 400, 300
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Teste de uso de *.PNG Para cSincuir"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 501, "TImage", 0 | WS_CHILD | WS_VISIBLE, 7, 3, 190, 257
 CONTROL "", 502, "TImage", 0 | WS_CHILD | WS_VISIBLE, 202, 4, 190, 257
 PUSHBUTTON "&Salida", 301, 170, 279, 60, 16
}
 
Regards, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 5:04 pm
by karinha
Download Completo aqui:

https://mega.nz/file/AYF02RRb#Ovq80SrEF ... Dvn3GrL1Fs

Dudas, pregunte, ok?

Regards, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 5:30 pm
by csincuir
Gracias Karinha.
Lo pruebo entonces.

Saludos cordiales.

Carlos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 5:55 pm
by karinha
csincuir wrote:Gracias Karinha.
Lo pruebo entonces.

Saludos cordiales.

Carlos.
Imagen:

https://imgur.com/is93WmO

Image

Regards, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 6:07 pm
by Enrico Maria Giordano
João, I can't see any problem compiling and running your sample.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 6:13 pm
by karinha
Enrico Maria Giordano wrote:João, I can't see any problem compiling and running your sample.
Dear Enrico, which version of FiveWin did you compile with? I think it even works with Fivewin from 2013. I'm not sure.

Estimado Enrico, ¿con qué versión de FiveWin compilaste? Creo que incluso funciona con Fivewin de 2013. No estoy seguro.

Gracias, thanks.

Reagrds, saludos.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 6:45 pm
by Enrico Maria Giordano
I'm using the latest FWH. And yes, it works fine. But I asked for a sample showing the problem.

Re: Error: FWH2206 Parte1

Posted: Mon Feb 12, 2024 8:16 pm
by nageswaragunupudi
Let us go step by step.
Step-1.

Keep the semdlg.prg and semdlg.rc posted above in the fwh\samples folder and build with

Code: Select all | Expand

buildh semdlg
You will see the dialog without any errors.
Please confirm.

Then we will go to next step.

Re: Error: FWH2206 Parte1

Posted: Tue Feb 13, 2024 1:30 pm
by csincuir
nageswaragunupudi wrote:Let us go step by step.
Step-1.

Keep the semdlg.prg and semdlg.rc posted above in the fwh\samples folder and build with

Code: Select all | Expand

buildh semdlg
You will see the dialog without any errors.
Please confirm.

Then we will go to next step.
Hola Rao,
Te comento, compile tu ejemplo como indicas y esta es la secuencia de mensajes que salieron al ejecutar el mismo:
Image

Si seteo la DATA lHtml := .f. antes de activar el dialogo ya no aparecen los dos primeros mensajes, y se soluciona el problema.

Code: Select all | Expand

   oDlg:lHtml := .f.
   ACTIVATE DIALOG oDlg CENTER ON INIT CargaLogoPng(oBmp)
Creo que la versión que tengo de FWH2206 tiene este problema con la Data lHtml

Saludos cordiales.

Carlos

Re: Error: FWH2206 Parte1

Posted: Tue Feb 13, 2024 4:51 pm
by nageswaragunupudi
Si seteo la DATA lHtml := .f. antes de activar el dialogo ya no aparecen los dos primeros mensajes, y se soluciona el problema.
Wonderful observation.
I would have never figured it out, because in my FWH2206 build the data lHtml is initialized to .F. even inside dialog.prg.
Looks like I have a revised build.
If you like, I can send you the FWH.EXE (installation program) of 2206 version, if you give me your email address.