FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error: FWH2206 Parte1
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 02:52 PM

Can I see a little sample PRG showing the problem, please?

Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 04:22 PM
Enrico Maria Giordano wrote:Can I see a little sample PRG showing the problem, please?
Hola Enrico,
Este es el programa:
Code (fw): Select all Collapse
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 (fw): Select all Collapse
//
// 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.
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 04:43 PM

Carlos, aguarde, haciendo un ejemplo simples de usar.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 04:58 PM
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.
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 04:59 PM
Code (fw): Select all Collapse
// 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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 05:00 PM
Archivo .RC
Code (fw): Select all Collapse
#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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 05:04 PM
Download Completo aqui:

https://mega.nz/file/AYF02RRb#Ovq80SrEFoHPvcZwWyfvV6MSS6v4bhW-SDvn3GrL1Fs

Dudas, pregunte, ok?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 05:30 PM

Gracias Karinha.

Lo pruebo entonces.

Saludos cordiales.

Carlos.

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 05:55 PM
csincuir wrote:Gracias Karinha.
Lo pruebo entonces.

Saludos cordiales.

Carlos.
Imagen:

https://imgur.com/is93WmO



Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 06:07 PM

João, I can't see any problem compiling and running your sample.

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 06:13 PM
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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 06:45 PM

I'm using the latest FWH. And yes, it works fine. But I asked for a sample showing the problem.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error: FWH2206 Parte1
Posted: Mon Feb 12, 2024 08:16 PM
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 (fw): Select all Collapse
buildh semdlg
You will see the dialog without any errors.
Please confirm.

Then we will go to next step.
Regards



G. N. Rao.

Hyderabad, India
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Error: FWH2206 Parte1
Posted: Tue Feb 13, 2024 01:30 PM
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 (fw): Select all Collapse
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:


Si seteo la DATA lHtml := .f. antes de activar el dialogo ya no aparecen los dos primeros mensajes, y se soluciona el problema.
Code (fw): Select all Collapse
   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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error: FWH2206 Parte1
Posted: Tue Feb 13, 2024 04:51 PM
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.
Regards



G. N. Rao.

Hyderabad, India