Change Dialog Style at runtime

Change Dialog Style at runtime

Postby fraxzi » Fri May 23, 2008 4: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby fraxzi » Fri May 23, 2008 4: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby fraxzi » Fri May 23, 2008 5: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Dialog-settings at runtime

Postby ukoenig » Fri May 23, 2008 7: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41405
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Fri May 23, 2008 3: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 36 guests