FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC DIALOG
Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Mon Dec 19, 2005 11:17 AM

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!

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: DIALOG
Posted: Mon Dec 19, 2005 12:35 PM
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!


1. Debugger : i don't know maybe Antonio can answer this one.

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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
DIALOG
Posted: Mon Dec 19, 2005 12:45 PM

> 1. Debugger : i don't know maybe Antonio can answer this one.

Windows for Pocket PC doesn't have a console window (text mode), so we can't use Harbour's own debugger.

We do recommend to use MsgInfo() calls to trace certain values, set breakpoints, etc.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Mon Dec 19, 2005 05:20 PM

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

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: DIALOG
Posted: Mon Dec 19, 2005 07:09 PM

include "Fwce.ch"

of course. :-)

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
DIALOG
Posted: Mon Dec 19, 2005 09:24 PM

include "Fwce.ch" should be enough to compile your PRG without errors.

Please try it and it you still get an error please tell us on what line you get the error.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Wed Dec 21, 2005 08:10 AM

I INCLUDE only FWCE.ch now

When compile I get error:
tmp.prg(16) Error E0030 Syntax error: "parse error at 'DIALOG'"

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
DIALOG
Posted: Wed Dec 21, 2005 08:18 AM
The following sample compiles fine for me:

#include "Fwce.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Wed Dec 21, 2005 09:09 AM
I added title to dialog...

DEFINE DIALOG oDlg RESOURCE "msgDaNe" TITLE 'BlaBla'

Without TITLE working OK
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 126
Joined: Thu Oct 06, 2005 10:18 PM
DIALOG
Posted: Wed Dec 21, 2005 01:34 PM
Hello,

title clause should be declared in resource file, then works ok
eg:

DialogId DIALOG DISCARDABLE 0, 0, 118, 50
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE 
CAPTION "Dialog Title"
BEGIN
// dialog control
END


Regards
Pawel
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
DIALOG
Posted: Wed Dec 21, 2005 01:47 PM

It should work from code only.

EMG

Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Thu Dec 22, 2005 06:57 AM
pawelu wrote:Hello,

title clause should be declared in resource file, then works ok
eg:

DialogId DIALOG DISCARDABLE 0, 0, 118, 50
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE 
CAPTION "Dialog Title"
BEGIN
// dialog control
END


Regards
Pawel


Thank you, PawelU. I know that.
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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
DIALOG
Posted: Thu Dec 22, 2005 07:14 AM
Darjo,

You may do it this way:

ACTIVATE DIALOG oDlg;
   ON INIT ( oDlg:SeText( "newTitle" ),;
             oDlg:nWidth( 100 ),;
             oDlg:nHeight( 100 ),;
             WndCenter( oDlg:hWnd ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9
Joined: Wed Dec 14, 2005 10:09 AM
DIALOG
Posted: Thu Dec 22, 2005 12:28 PM
Antonio Linares wrote:Darjo,

You may do it this way:

ACTIVATE DIALOG oDlg;
   ON INIT ( oDlg:SeText( "newTitle" ),;
             oDlg:nWidth( 100 ),;
             oDlg:nHeight( 100 ),;
             WndCenter( oDlg:hWnd ) )


A little mistake: SeText( -> SetText(
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