FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Code that used to work fails
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Code that used to work fails
Posted: Tue Nov 29, 2011 11:39 AM
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 (fw): Select all Collapse
#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 (fw): Select all Collapse
#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
}
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Code that used to work fails
Posted: Tue Nov 29, 2011 04:15 PM
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 :-)
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.
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Re: Code that used to work fails
Posted: Tue Nov 29, 2011 04:54 PM

No, didn't work.

Harbour 3.1.0dev (Rev. 17102).
gcc (tdm-1) 4.5.2-dw2
FW 11.10

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Code that used to work fails
Posted: Tue Nov 29, 2011 05:00 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Code that used to work fails
Posted: Tue Nov 29, 2011 07:26 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Code that used to work fails
Posted: Tue Nov 29, 2011 07:53 PM
Concentra,

This fix is required in Class TDialog for MinGW:

dialog.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Re: Code that used to work fails
Posted: Wed Nov 30, 2011 10:01 AM

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Code that used to work fails
Posted: Wed Nov 30, 2011 01:31 PM

Mauricio,

New libs sent to your email :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion