Code that used to work fails

Post Reply
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Code that used to work fails

Post by concentra »

Antonio, the folowing code used to work in a previous version and isn't working anymore.
The text and the title do not change and the dialog isn't centered.
Note the NOWAIT clause.

The previous version was 09.11 using xHarbour.com's Pelles C and now I am using Harbour 11.10 + MinGw.
I was unable to test with FW 11.10 version + xHarbour.com because my xHarbour.com's isn't FW 11.10 compatible.
Could you investigate if this is a problem with MinGw, FW version or my code ?
PRG :

Code: Select all

#INCLUDE "fivewin.ch"
FUNCTION Main()
   LOCAL oDlgTeste, oTexto, cTexto
   DEFINE DIALOG oDlgTeste RESOURCE 18503 TITLE "Teste Title"
   REDEFINE SAY  oTexto VAR cTexto ID 101 OF oDlgTeste
   ACTIVATE DIALOG oDlgTeste CENTER NOWAIT

   cTexto := "Another text..."
   oTexto:SETTEXT( cTexto )

   MessageBox( 0, "Why dialog text didn't change ?", "Why title didn't change ?", 0 )
RETURN NIL
RC :

Code: Select all

#include "winuser.h"
#include "winnt.h"
#include "commctrl.h"

18503 DIALOG DISCARDABLE 13, 22, 250, 100
STYLE WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_VISIBLE
CAPTION "Teste..."
{
  CONTROL "Text", 101, "Static", SS_CENTER, 2, 9, 245, 15
}
 
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Code that used to work fails

Post by ukoenig »

I think, that will work with any FWH-version :

ACTIVATE DIALOG oDlgTeste CENTER NOWAIT ;
ON INIT ( oDlgTeste:cTitle := "New Text", ;
cTexto := "Another text...", oTexto:SETTEXT( cTexto ) )


You can force a Dialog-position ( ON INIT ) with :
oDlgTeste:Move( nTop, nLeft, DlgWidth, DlgHeight , .f. )
( possible Calculation of centered Position )

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Code that used to work fails

Post by concentra »

No, didn't work.

Harbour 3.1.0dev (Rev. 17102).
gcc (tdm-1) 4.5.2-dw2
FW 11.10
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Code that used to work fails

Post by ukservice »

Hello,

It is working with FWH 11.11, Borland 5.82 and Harbour 3.1
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Code that used to work fails

Post by Antonio Linares »

Concentra,

We already know what is going on. We are working to fix it, thanks! :-)

It is the same reason for the bug detected by Rimantas!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Code that used to work fails

Post by Antonio Linares »

Concentra,

This fix is required in Class TDialog for MinGW:

dialog.prg
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Code that used to work fails

Post by concentra »

Thanks Antonio.
But the DIALOG.PRG I have isn't the same as yours, the lines aren't the same...
Could you send me the full DIALOG.PRG ?

Maurício Faria
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Code that used to work fails

Post by Antonio Linares »

Mauricio,

New libs sent to your email :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply