DIALOG
DIALOG
I have this function:
#include "FWCE.ch"
************************************
FUNCTION m_DaNe(cMsg,aBtn,cTitle)
************************************
LOCAL oDlg
DEFINE DIALOG oDlg RESOURCE "msgDaNe"
REDEFINE SAY ID 3 OF oDlg PROMPT cMsg
REDEFINE BUTTON ID 1 OF oDlg PROMPT aBtn[1] ACTION oDlg:End(1)
REDEFINE BUTTON ID 2 OF oDlg PROMPT aBtn[2] ACTION oDlg:End(2)
ACTIVATE DIALOG oDlg
RETURN (oDlg:nResult)
1. how can I use (start) debuger ?
2. how can I change the caption (title) and background color of DIALOG ?
3. how can I change the background color of REDEFINE SAY
4. it is posible to redefine the size (width,height) of DIALOG after (before) it's activated ?
Thank you!
#include "FWCE.ch"
************************************
FUNCTION m_DaNe(cMsg,aBtn,cTitle)
************************************
LOCAL oDlg
DEFINE DIALOG oDlg RESOURCE "msgDaNe"
REDEFINE SAY ID 3 OF oDlg PROMPT cMsg
REDEFINE BUTTON ID 1 OF oDlg PROMPT aBtn[1] ACTION oDlg:End(1)
REDEFINE BUTTON ID 2 OF oDlg PROMPT aBtn[2] ACTION oDlg:End(2)
ACTIVATE DIALOG oDlg
RETURN (oDlg:nResult)
1. how can I use (start) debuger ?
2. how can I change the caption (title) and background color of DIALOG ?
3. how can I change the background color of REDEFINE SAY
4. it is posible to redefine the size (width,height) of DIALOG after (before) it's activated ?
Thank you!
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: DIALOG
1. Debugger : i don't know maybe Antonio can answer this one.remecd wrote:I have this function:
#include "FWCE.ch"
************************************
FUNCTION m_DaNe(cMsg,aBtn,cTitle)
************************************
LOCAL oDlg
DEFINE DIALOG oDlg RESOURCE "msgDaNe"
REDEFINE SAY ID 3 OF oDlg PROMPT cMsg
REDEFINE BUTTON ID 1 OF oDlg PROMPT aBtn[1] ACTION oDlg:End(1)
REDEFINE BUTTON ID 2 OF oDlg PROMPT aBtn[2] ACTION oDlg:End(2)
ACTIVATE DIALOG oDlg
RETURN (oDlg:nResult)
1. how can I use (start) debuger ?
2. how can I change the caption (title) and background color of DIALOG ?
3. how can I change the background color of REDEFINE SAY
4. it is posible to redefine the size (width,height) of DIALOG after (before) it's activated ?
Thank you!
2 . Caption and color
DEFINE DIALOG oDlg RESOURCE "msgDaNe" title "xxxxx" color clr1,clr2
Clr1 and clr2 can be nrgb(.....) or CLR_WHITE, CLR_BLUE etc...
3. Same for Redefine say just add color xx,xx at the end
4. You can always change dialog size at activation time. Use the on init clause for this
ACTIVATE DIALOG ODLG ON INIT odlg:move(xx,xx) or anyother function
Richard
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
DIALOG
Sorry, it doesn't work yet.
I have exactly this program:
#include "FWCE.ch"
#include "FiveWin.ch"
********************
FUNCTION Main()
********************
DEFINE WINDOW owMain TITLE 'sdsdsd'
ACTIVATE WINDOW owMain ON CLICK m_DaNe('Something...',{'Yes','No'},'Atention !!!')
return nil
************************************
FUNCTION m_DaNe(cMsg,aBtn,cTitle)
************************************
LOCAL oDlg
DEFINE DIALOG oDlg RESOURCE "msgDaNe" TITLE 'BlaBla'
REDEFINE SAY ID 3 OF oDlg PROMPT cMsg
REDEFINE BUTTON ID 1 OF oDlg PROMPT aBtn[1] ACTION oDlg:End(1)
REDEFINE BUTTON ID 2 OF oDlg PROMPT aBtn[2] ACTION oDlg:End(2)
ACTIVATE DIALOG oDlg
RETURN (oDlg:nResult)
If I don't INCLUDE "FiveWin.ch", compiler shown error in "DEFINE DIALOG" row.
If I INCLUDE "FiveWin.ch", then when I start exe, error shows:
Message not found.
TWINDOW:BMOVED
One stupid question: which INCLUDE file is for programing in PPC - I'm beginner in PPC
Thank you, Richard & Antonio
I have exactly this program:
#include "FWCE.ch"
#include "FiveWin.ch"
********************
FUNCTION Main()
********************
DEFINE WINDOW owMain TITLE 'sdsdsd'
ACTIVATE WINDOW owMain ON CLICK m_DaNe('Something...',{'Yes','No'},'Atention !!!')
return nil
************************************
FUNCTION m_DaNe(cMsg,aBtn,cTitle)
************************************
LOCAL oDlg
DEFINE DIALOG oDlg RESOURCE "msgDaNe" TITLE 'BlaBla'
REDEFINE SAY ID 3 OF oDlg PROMPT cMsg
REDEFINE BUTTON ID 1 OF oDlg PROMPT aBtn[1] ACTION oDlg:End(1)
REDEFINE BUTTON ID 2 OF oDlg PROMPT aBtn[2] ACTION oDlg:End(2)
ACTIVATE DIALOG oDlg
RETURN (oDlg:nResult)
If I don't INCLUDE "FiveWin.ch", compiler shown error in "DEFINE DIALOG" row.
If I INCLUDE "FiveWin.ch", then when I start exe, error shows:
Message not found.
TWINDOW:BMOVED
One stupid question: which INCLUDE file is for programing in PPC - I'm beginner in PPC
Thank you, Richard & Antonio
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
The following sample compiles fine for me:
EMG
Code: Select all
#include "Fwce.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
RESOURCE "TEST"
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Hello,
title clause should be declared in resource file, then works ok
eg:
Regards
Pawel
title clause should be declared in resource file, then works ok
eg:
Code: Select all
DialogId DIALOG DISCARDABLE 0, 0, 118, 50
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE
CAPTION "Dialog Title"
BEGIN
// dialog control
END
Pawel
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Thank you, PawelU. I know that.pawelu wrote:Hello,
title clause should be declared in resource file, then works ok
eg:
RegardsCode: Select all
DialogId DIALOG DISCARDABLE 0, 0, 118, 50 STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE CAPTION "Dialog Title" BEGIN // dialog control END
Pawel
But I need to change caption, backcolor and size of dialog later in my code, not in .RC file.
I need a modal window with caption, backcolor and size(width,height). All this parameters are declared and known before I build the window. Is this possible in PPC?
Regards, Darjo
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Darjo,
You may do it this way:
You may do it this way:
Code: Select all
ACTIVATE DIALOG oDlg;
ON INIT ( oDlg:SeText( "newTitle" ),;
oDlg:nWidth( 100 ),;
oDlg:nHeight( 100 ),;
WndCenter( oDlg:hWnd ) )
A little mistake: SeText( -> SetText(Antonio Linares wrote:Darjo,
You may do it this way:
Code: Select all
ACTIVATE DIALOG oDlg; ON INIT ( oDlg:SeText( "newTitle" ),; oDlg:nWidth( 100 ),; oDlg:nHeight( 100 ),; WndCenter( oDlg:hWnd ) )
This working now.
But what about BACKGROUND color of DIALOG ?
In which help file can i find all propertis and method for classes?
I look in FiveWinClass but the most number does't work (or i don't know how to use them ???).
Darjo