FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change Dialog Style at runtime
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Change Dialog Style at runtime
Posted: Fri May 23, 2008 04:49 AM

How to change dialog style define from resource?

RC:

INFO DIALOG 6, 15, 473, 347
STYLE WS_POPUP | WS_VISIBLE | WS_SYSMENU
FONT 10, "Courier"
{
}

PRG:

//perfectly as expected
DEFINE DIALOG oDlg RESOURCE 'INFO'
...
ACTIVATE DIALOG oDlg

//-------------------
//on the other prg with child window

DEFINE WINDOW oWnd TITLE "Test Child" MDICHID

       DEFINE DIALOG oDlg RESOURCE 'INFO' OF oWnd
       ...  
       ACTIVATE DIALOG oDlg NOWAIT;
                      ON INIT SetWindowLong( oDlg:hWnd, GWL_EXSTYLE, nOr(WS_CHILD ) )

ACTIVATE WINDOW oWnd
//-------------------

not working as expected...??? the oDlg must be transform to child of oWnd

any help?

The purpose is to use dialog 'INFO' as popup dialog somewhere and a child of oWnd somewhere within the app.

How to change dialog style at runtime?

-Best Regards,

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Change Dialog Style at runtime
Posted: Fri May 23, 2008 04:55 AM

I GOT IT!!!

Oh my!!! that was easy and fast reply too :P :P :P

I put

....
ACTIVATE DIALOG oDlg NOWAIT CENTERED;
ON INIT SetParent( oDlg:hWnd, oWnd:hWnd )
....

Now I can use dialog as popup and child to any window....

What am I thinking.... :lol: :lol: :lol: :lol: :lol: :lol:

Thanks!

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Change Dialog Style at runtime
Posted: Fri May 23, 2008 05:14 AM

Yet... still not able to change dialog style at runtime...

The above is just a workaround.... :wink:

Feel free to post your solution please.... :idea:

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Dialog-settings at runtime
Posted: Fri May 23, 2008 07:45 AM

Hello,

There is a toppic for V-tools in the forum.
There, i change everything at runtime.
Afterwards i write the source for it.
You find it at :

http://www.pflegeplus.com/fw_downloads/vtools.zip

When you need, i can send you the complete source-part of the
dialog-handling of V-Tools.

The new Version 2.0 is nearly finished with many new functions
and support Vista and the new FWH 8.05

It writes now the complete source of a design and includes
the make file as well, building the exe-file.

In another 2 weeks it be be finished.

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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Change Dialog Style at runtime
Posted: Fri May 23, 2008 10:41 AM

Frances,

Some styles can be changed at runtime, some others can't be change. Its a Windows limitation.

In those cases you can only end() the dialog (destroy it) and create a new one with the right styles.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Change Dialog Style at runtime
Posted: Fri May 23, 2008 03:09 PM

Mr. Antonio,

After years of programming with Xharbour.org/FWH....
Fivewin is so robust and flexible you can have some workaround effortlessly... to fit one's style in coding...

Glad 8) you're 8) here!

Best regards,

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion