FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Can I change the DIALOG TITLE to Non-Standard Windows?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Sun Jul 05, 2015 10:17 AM
Dear All,

Can I change (define) DIALOG TITLE BAR to another style? I try to put this after DEFINE DIALOG but not successful.

Code (fw): Select all Collapse
Function Main()
DEFINE DIALOG oDlg RESOURCE "MYDIALOG" TITLE "My New Style Dialog"

NewDlg( oDlg )

ACTIVATE DIALOG 
return nil

Function NewDlg( oDlg )
oDlg:nStyle := nOr( WS_CHILD, WS_POPUP ) 
oDlg:Say( 0, 0, rtrim(oDlg:cCaption), nRGB( 153,217, 234),nRGB( 0, 162, 232),,2)  // nAlign 2 = CENTER (I think)
oDlg:SayBitmap( oDlg:nTop+5, oDlg:nWidth-15, 'EXIT', 25, 20 )
return

Thanks for any help and idea.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Sun Jul 05, 2015 10:20 AM

DEFINE DIALOG oDlg .............STYLE <yourstyle>

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Sun Jul 05, 2015 10:36 AM
Dear Mr.Rao,

If I need like this, how do I make it in DEFINE ... STYLE...?

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Sun Jul 05, 2015 12:57 PM

Dutch,

Please review FWH\samples\skin1.prg and skin2.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Sun Jul 05, 2015 08:21 PM

And

viewtopic.php?f=6t=30870#p177769

with class TTitle

&

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Mon Jul 06, 2015 02:43 AM
Dear All,

I mean, I need to change existing program with define function. I try to change by put a function after define dialog. The problem is the STYLE will remove the TITLE and cut the TITLE space out too. Can I use STYLE and the size is the same? Then I can make the (our title style) TITLE in the same place of DIALOG TITLE.

This idea for migrate the existing program to new style without modify all DIALOGs.


Thanks for an idea.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Mon Jul 06, 2015 05:56 AM

Dutch,

You need to resize all dialogs doing:

oDlg:Resize( oDlg:nWidth, oDlg:nHeight + 30 )

then finally, you have to move all controls downwards:

AEval( oDlg:aControls, { | oCtrl | oCtrl:SetPos( oCtrl:nTop + 30, oCtrl:nLeft ) } )

If you need to move controls that don't use REDEFINE, then I will show you how to do it.
Its similar, but we can't use oDlg:aControls.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Can I change the DIALOG TITLE to Non-Standard Windows?
Posted: Tue Jul 07, 2015 03:33 PM

Dear Antonio,

If the change will effect with display speed, I don't need it. Because it will make the program slower, if there are many control in a Dialog.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion