Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xHarbour Beginner

280 views
Skip to first unread message

SidReynolds

unread,
Jan 14, 2009, 7:12:25 AM1/14/09
to
Hi all,
I've just signed up to xHarbour, and recompiled my old Clipper
programs.
As a first step to converting to GUI, and get my confidence up, I want
to convert my messages (with Dos look & a box around message)... to
GUI look with an OK button to clear GUI message.
Does anyone know of any xHarbour functions where if I pass a string to
it, and it returns a GUI message, with an OK button? If not, how do I
go about coding (any sample code anywhere)?
Thanks, Sid

f.k...@azsoftware.be

unread,
Jan 14, 2009, 4:41:24 PM1/14/09
to

Hi Sid,
Have a look at the next post ...
And also the my other posts HARBOUR BEGINNER on 09/01/2009.
Have fun,
Frans

SidReynolds

unread,
Jan 15, 2009, 2:33:02 AM1/15/09
to

Hi Frans,
I didn't understand the next post.... and found none on 09/01/2009 by
HARBOUR BEGINNER, but I found 2 one 10/01/09.
Anyway I googled hwgui, and downloaded it the zip, and extracted...
but made no progress after that.
Can you give me more instructions? eg
-I couldn't build hwgui.lib, as the hwgui.lib xbp file didn't work.
-And which of the many source files provided would generate simple GUI
message windows by passing a string, or array of strings?
Thanks, Sid

Alex Strickland

unread,
Jan 15, 2009, 3:27:39 AM1/15/09
to

I have sent you a replacement I wrote for Clipper Alert. It does,
however, use HWGUI, so that may be a stumbling block ...

HTH
Regards
Alex

cul...@gmail.com

unread,
Jan 15, 2009, 9:11:30 AM1/15/09
to
On 15 jan, 05:33, SidReynolds <s...@optusnet.com.au> wrote:
> On Jan 15, 8:41 am, f.kl...@azsoftware.be wrote:
>
>
>
> > On 14 jan, 13:12, SidReynolds <s...@optusnet.com.au> wrote:
>
> > > Hi all,
> > > I've just signed up to xHarbour, and recompiled my old Clipper
> > > programs.
> > > As a first step to converting to GUI, and get my confidence up, I want
> > > to convert my messages (with Dos look & a box around message)... to
> > > GUI look with an OK button to clear GUI message.
> > > Does anyone know of any xHarbour functions where if I pass a string to
> > > it, and it returns a GUI message, with an OK button? If not, how do I
> > > go about coding (any sample code anywhere)?
> > > Thanks, Sid
>
> > Hi Sid,
> > Have a look at the next post ...
> > And also the my other posts HARBOUR BEGINNER on 09/01/2009.
> > Have fun,
> > Frans
>
> Hi Frans,
> I didn't understand the next post.... and found none on 09/01/2009 by
> HARBOUR BEGINNER, but I found 2 one 10/01/09.
> Anyway I googled hwgui, and downloaded it the zip, and extracted...
> but made no progress after that.
> Can you give me more instructions? eg

First.
you need to have tortoisecvs instaled to download hwgui direct from
CVS
CVSROOT=:pserver:anon...@hwgui.cvs.sourceforge.net:/cvsroot/hwgui
module = hwgui
or you can download the latest version from www.hwgui.net

the hwgui download from sf if an very old version

Regards
Luiz

f.k...@azsoftware.be

unread,
Jan 15, 2009, 1:31:22 PM1/15/09
to
> Thanks, Sid- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Hi Sid,

Indead, it was rather difficult to have a HWHUI library up and
running.

I has to do a lot of thinks (hours) before I got it running.

You will have to look it up yourself, but here are my hints (I made
myself a document do be able to do it again later ...) :

You need :
- Borland C++ compiler (freecommandLinetools.exe)
- HWGUI library (hwgui-2.16.src.zip)
- Also for the documentation only hwgui-2.17.src.zip (this version
will not allow the building of the libs ...)
- Xharbour (xHarbour Binaries for Borland C++ 5.5.1)

I downloade these from Soureforge.net and Xharbour.org

Then :

Installation procedure for HWGUI V2.16, Borland compiler V5.5,
Xharbour V1.0.0.beta.

- Install hwgui in C:\HWGUI
- Copy the HWGUI\DOC files from V2.17 to C:\HWGUI\DOC (they are more
complete)
- Install Borland in C:\HWGUI\BCC55
- Install Xharbour on C:\HWGUI  this will create C:\HWGUI\XHARBOUR
- Copy all *.H files from C:\HWGUI\BCC55\INCLUDE to C:\HWGUI\INCLUDE
- In dos box :
o Set HB_PATH=c:\hwgui\xharbour
o Set path=c:\hwgui\xharbour\bin;c:\hwgui\bcc55\bin;c:\windows
\system32;
o cd c:\hwgui
o make_b32 (uses MAKE.EXE from Borland)

The MAKE_B32 should must end without error messages (look at the LOG
file).

Then, look at the sample files, pick an easy example, and use the
BLD.BAT file to make your first WIN EXE.

There are still some other things to do, I did not write down
eveything ..

Good Luck,

Frans

FP

unread,
Jan 15, 2009, 1:52:30 PM1/15/09
to
It's really really really strange that you had difficulties compiling 2.17.

Version 2.16 ir really OLD and shoudn't be used... it works but it
misses a lot of features.

If you don't want to use a cvs client to update the source files, you
can use this link:
http://hg.toursservice.eu/hg/hwgui-cvs/archive/tip.zip
it is update every 20 minutes from the cvs (actually it is a mercurial
repository).

Real documentation is the guilib.ch file in include directory. It gives
you all the command parameters...

> Indead, it was rather difficult to have a HWHUI library up and
> running.


> I has to do a lot of thinks (hours) before I got it running.

I hope you don't count setting xharbour and bcc in these hours, since
you should have done it anyway.

Once you have a working xHarbour, the only thing you need to do before
compiling hwgui is


> o Set HB_PATH=c:\hwgui\xharbour

> o make_b32 (uses MAKE.EXE from Borland)

and of course, to compile samples

> BLD.BAT file to make your first WIN EXE.

I suggest you to study and compile a.prg in samples/all

Then go in utils/designer and make_bld.... the designer will give you a
quick start....

> There are still some other things to do, I did not write down
> eveything ..

I repeat, the first steps you did you had to do anyway to install
xHarbour !!

Francesco

SidReynolds

unread,
Jan 15, 2009, 6:30:26 PM1/15/09
to

Hi Francesco,
Re "Once you have a working xHarbour, the only thing you need to do
before compiling hwgui is
Set HB_PATH=c:\hwgui\xharbour


make_b32 (uses MAKE.EXE from Borland) "

I did this, ie
-moved all downloaded hwgui-2.17 files & folders to new c:\hwgui
\xharbour
-copied Set HB_PATH=c:\hwgui\xharbour to the top of "make_b32.bat"
-ran make_32.bat
... but I keep getting same errors:
MAKE : fatal error U1008: -l : cannot find file
Any advice?
Regards, Sid

SidReynolds

unread,
Jan 15, 2009, 6:33:59 PM1/15/09
to
> CVSROOT=:pserver:anonym...@hwgui.cvs.sourceforge.net:/cvsroot/hwgui

> module = hwgui
> or you can download the latest version from www.hwgui.net
>
> the hwgui download from sf if an very old version
>
> Regards
> Luiz

Hi Luiz,
I don't understand tortoisecvs stuff (remember I only recompiled
clipper stuff to xHarbour ie an xHarbour beginner).
I also tried www.hwgui.net but it's all in Spanish (I think?) and
there doesn't seem to be an English button.
Any help?
Regards, Sid

SidReynolds

unread,
Jan 15, 2009, 6:39:37 PM1/15/09
to
> I also triedwww.hwgui.netbut it's all in Spanish (I think?) and

> there doesn't seem to be an English button.
> Any help?
> Regards, Sid

Hi Luiz/Francesco
... also why do we even need to build this elusive hwgui.lib? Why
can't we just download the lib itself, straight into xharbour\lib
folder?
I mean xHarbour & Clipper come with their own libs, which we don't
have to build, so why not hwgui?
Regards, Sid

FP

unread,
Jan 15, 2009, 6:47:41 PM1/15/09
to

I'm going to bed but since I don't know your time zone I try to answer
quickly so you may test further.

1) you must be able to succesfully compile ANY xHarbour programs. This
means that you must be able to get an ".exe" file from a xharbour
program. This involve setting PATH and creating some configuration files
inside BCC directory (please go to www.xharbour.org, you will find all
the info to set the environment!!!!).

2) HB_PATH must point to the root of xHarbour. Mine is in
c:\dev\l\xharbour\1.0.0b1 (named after the version I use)
If you do a dir when in this directory you should see this listing:
10/02/2008 14.28 <DIR> .
10/02/2008 14.28 <DIR> ..
03/06/2008 21.47 <DIR> bin
07/11/2007 15.44 126.912 ChangeLog
18/12/2007 00.36 <DIR> contrib
20/09/2008 22.55 <DIR> doc
30/11/2008 22.44 <DIR> include
29/10/2008 23.52 <DIR> lib
23/12/2007 22.28 <DIR> obj
10/02/2008 17.04 <DIR> source
02/03/2008 01.42 <DIR> tests

bin, include, lib are mandatory, the other are optional

3) unzip hwgui source code in ANOTHER directory, mine is in c:\dev\src\hwgui

4) cd \dev\src\hwgui

5) type
HB_PATH=c:\dev\l\xharbour\1.0.0b1

6) type
make_b32


Please have step 1 working before going on !

Francesco

FP

unread,
Jan 15, 2009, 6:53:41 PM1/15/09
to

> Hi Luiz/Francesco
> ... also why do we even need to build this elusive hwgui.lib? Why
> can't we just download the lib itself, straight into xharbour\lib
> folder?
> I mean xHarbour & Clipper come with their own libs, which we don't
> have to build, so why not hwgui?
> Regards, Sid

There are several xHarbour downloads, each one was compiled by a
different compiler !
And with hwgui we should provide a version of the lib for every
compiler... not possible !

Try what I say in the other post. After the initial setup everything works !

One suggestion: NEVER copy hwgui libs in the xHarbour lib directory.
Hwgui is a work in progress, almost every day there is a new function
to test and you must be able to quickly switch between hwgui versions.
For this reason I use a modified bld.bat that uses another variable
enronmwent HW_PATH to link to hwgui libraries.

Francesco

SidReynolds

unread,
Jan 15, 2009, 8:29:15 PM1/15/09
to
On Jan 16, 10:47 am, FP <mc8647__rimu...@mclink.it> wrote:
> I'm going to bed but since I don't know your time zone I try to answer
> quickly so you may test further.
>
> 1) you must be able to succesfully compile ANY xHarbour programs. This
> means that you must be able to get an ".exe" file from a xharbour
> program. This involve setting PATH and creating some configuration files
> inside BCC directory (please go towww.xharbour.org,  you will find all

> the info to set the environment!!!!).
>
> 2) HB_PATH must point to the root of xHarbour. Mine is in
> c:\dev\l\xharbour\1.0.0b1 (named after the version I use)
> If you do a dir when in this directory you should see this listing:
> 10/02/2008  14.28    <DIR>          .
> 10/02/2008  14.28    <DIR>          ..
> 03/06/2008  21.47    <DIR>          bin
> 07/11/2007  15.44           126.912 ChangeLog
> 18/12/2007  00.36    <DIR>          contrib
> 20/09/2008  22.55    <DIR>          doc
> 30/11/2008  22.44    <DIR>          include
> 29/10/2008  23.52    <DIR>          lib
> 23/12/2007  22.28    <DIR>          obj
> 10/02/2008  17.04    <DIR>          source
> 02/03/2008  01.42    <DIR>          tests
>
> bin, include, lib are mandatory, the other are optional
>
> 3) unzip hwgui source code in ANOTHER directory, mine is in c:\dev\src\hwgui
>
> 4) cd \dev\src\hwgui
>
> 5) type
> HB_PATH=c:\dev\l\xharbour\1.0.0b1
>
> 6) type
> make_b32
>
> Please have step 1 working before going on !
>
> Francesco

Hi Francesco,

Step #1: Already done, as I've recompiled/linked my old clipper
programs using xHarbour make program.

Step #2: I downloaded "hwgui-2.17.src", and extracting it to folder of
same name (I had no choice in the naming).
I then copied all the files/folders to new folder c:\hwgui\folder
I then did a DOS dir of folder, refer below... note that despite your
statement "bin, include, lib are mandatory"... I don't have a bin
folder. Do I just create one, or are there files required in advance?

Volume in drive C is S3A3306D001
Volume Serial Number is 14C7-CD76
Directory of C:\hwgui\xharbour
16/01/2009 10:26 AM <DIR> .
16/01/2009 10:26 AM <DIR> ..
16/01/2009 10:21 AM <DIR> bu
16/01/2009 10:21 AM <DIR> contrib
16/01/2009 10:21 AM <DIR> doc
16/01/2009 10:21 AM <DIR> gtk
16/01/2009 10:21 AM <DIR> include
16/01/2009 10:22 AM <DIR> lib
16/01/2009 10:22 AM <DIR> obj
16/01/2009 10:21 AM <DIR> samples
16/01/2009 10:21 AM <DIR> source
16/01/2009 10:21 AM <DIR> utils
15/01/2009 06:20 PM 76,671 Changelog
16/01/2009 12:15 PM 0 f1
16/01/2009 10:26 AM 0 f2
15/01/2009 06:20 PM 248 Makefile
15/01/2009 06:20 PM 1,422 Suggestions
15/01/2009 06:20 PM 106,342 Changelog.001
15/01/2009 06:20 PM 106,186 Changelog.002
15/01/2009 06:20 PM 8,911 Readme.activex
16/01/2009 10:17 AM 15 l.bat
16/01/2009 10:22 AM 949 make_b32.bat
15/01/2009 06:20 PM 787 make_pc.bat
15/01/2009 06:20 PM 377 make_vc.bat
15/01/2009 06:20 PM 1,065 make_w32.bat
15/01/2009 06:20 PM 565 makedll.bat
15/01/2009 06:20 PM 356 makemngw.bat
16/01/2009 10:22 AM 12 r.bat
15/01/2009 06:20 PM 3,826 makedll.bc
15/01/2009 09:47 PM 8,256 makefile.bc
15/01/2009 06:20 PM 3,745 makefile.gcc
15/01/2009 09:59 PM 1,024 hwgui.lib
15/01/2009 09:22 PM 183 hwgui.lib.log
16/01/2009 10:26 AM 124 make_b32.log
15/01/2009 06:39 PM 124 makedll.log
15/01/2009 06:20 PM 16,332 makefile.pc
15/01/2009 06:20 PM 3,550 Makefile.scr
15/01/2009 06:20 PM 1,922 make_gnu.sh
15/01/2009 06:20 PM 1,249 make_gtk.sh
15/01/2009 06:20 PM 993 install.txt
15/01/2009 06:20 PM 1,261 license.txt
15/01/2009 06:20 PM 634 todo.txt
15/01/2009 06:20 PM 16,820 whatsnew.txt
15/01/2009 06:20 PM 5,957 makefile.vc
15/01/2009 06:20 PM 15,700 makefile.wc
15/01/2009 09:22 PM 422 hwgui.lib.xbp
34 File(s) 386,028 bytes
12 Dir(s) 35,782,631,424 bytes free

Step #3: Isn't the source files required to generate the library file,
already in
C:\hwgui\xharbour]source or C:\hwgui\xharbour\samples.
Sorry but I don't which source files are used to generate the elusive
lib file.

Steps #4-6: I've already effectively done these... and last step got
the error message:


MAKE : fatal error U1008: -l : cannot find file

Hopefully hear form you tomorrow

Regards, Sid
(from sunny warm Sydney)

FP

unread,
Jan 16, 2009, 1:40:38 AM1/16/09
to
This is the dir of xHarbour, you listed the hwgui directory !

>> 2) HB_PATH must point to the root of xHarbour. Mine is in
>> c:\dev\l\xharbour\1.0.0b1 (named after the version I use)
>> If you do a dir when in this directory you should see this listing:
>> 10/02/2008 14.28 <DIR> .
>> 10/02/2008 14.28 <DIR> ..
>> 03/06/2008 21.47 <DIR> bin
>> 07/11/2007 15.44 126.912 ChangeLog
>> 18/12/2007 00.36 <DIR> contrib
>> 20/09/2008 22.55 <DIR> doc
>> 30/11/2008 22.44 <DIR> include
>> 29/10/2008 23.52 <DIR> lib
>> 23/12/2007 22.28 <DIR> obj
>> 10/02/2008 17.04 <DIR> source
>> 02/03/2008 01.42 <DIR> tests

> Steps #4-6: I've already effectively done these... and last step got


> the error message:
> MAKE : fatal error U1008: -l : cannot find file

I will reply from the office, in the meanwhile please take make_b32.log,
zip it and send to me at mc8647@(addressh from this message).

Anyway, it seems there is a missing variable environment...

Francesco
(from rainy Rome)

SidReynolds

unread,
Jan 16, 2009, 9:04:54 AM1/16/09
to

Hi Francesco,

Sorry, I couldn't find your email address.

The contents of make_b32.log is:
"Microsoft (R) Program Maintenance Utility Version 4.06
Copyright (C) Microsoft Corp 1984-1987. All rights reserved."
Nothing else.

Also, the dir I did was from the downloaded GUI directory & sub-
folders. Were you wanting my xHarbout directory? If so it is:

Volume in drive C is S3A3306D001
Volume Serial Number is 14C7-CD76

Directory of C:\xHB

17/01/2009 01:03 AM <DIR> .
17/01/2009 01:03 AM <DIR> ..
06/01/2009 09:06 PM <DIR> bin
06/01/2009 09:05 PM <DIR> c_include
06/01/2009 09:05 PM <DIR> c_lib
06/01/2009 09:05 PM <DIR> dll
06/01/2009 09:05 PM <DIR> doc
15/01/2009 09:04 PM <DIR> include
15/01/2009 10:46 PM <DIR> lib
14/01/2009 10:53 PM <DIR> samples
06/01/2009 09:06 PM <DIR> Source
19/02/2005 06:40 PM 19,664 COPYING
19/02/2005 06:40 PM 75,264 xHarbour End-User License
Agreement.doc
05/11/2001 09:30 AM 165,376 UNWISE.EXE
12/11/2008 09:31 PM 2,884 Install-xHBDocs-DEMO-PDF.log
07/11/2008 02:36 PM 215,631 xHarbourBuilder-DEMO-
September2008-93.log
06/01/2009 09:07 PM 208,098 xHarbourBuilder-Personal-
September2008-93.log
19/02/2005 06:40 PM 3,301 packing.lst
19/02/2005 06:40 PM 454 XBScript.lib License.txt
11/11/2006 08:54 AM 52 Purchase 'xHarbour Language
Reference Guide' online.url
19/02/2005 06:40 PM 51 Visual xHarbour.url
24/01/2006 11:31 AM 57 xHarbour Builder Buttons.url
06/03/2007 01:39 PM 52 xHarbour Developers Network
(xHDN).url
02/03/2008 07:55 PM 108 xHarbour.com.url
02/03/2008 07:55 PM 113 xHarbour.doc.url
19/02/2005 06:40 PM 47 xHarbour.org.url
16 File(s) 691,152 bytes
11 Dir(s) 35,683,696,640 bytes free

Any help?
Regards, Sid (about to go to bed)

FP

unread,
Jan 17, 2009, 9:20:10 AM1/17/09
to
Hi Sid,
I start to understand the possible problem:
you are using the compiler that comes with xHarbour Builder.
make_b32 is for people using BCC (Borland compiler)!!

If I remember well, xharbour Builder uses Pelles C, so you should try to
run Make_pc.bat

The library is ok with Borland and Microsoft. I never tested it with
Pelles and neither I personally know anybody that did it.

Francesco

SidReynolds

unread,
Jan 18, 2009, 8:16:09 AM1/18/09
to

Hi Francesco,
I tried make_pc.bat, but it says "pomake" is not recognised as an
internal or external command.
I think this is getting difficult - all I originally asked for was a
simple xHarbour function where if I pass a string/array, it returns a
GUI message, with an OK button.
Maybe I should give up on GUI, and stick to my xHarbour-compiled
clipper files.
Regards, Sid

FP

unread,
Jan 18, 2009, 8:26:38 AM1/18/09
to


> I tried make_pc.bat, but it says "pomake" is not recognised as an
> internal or external command.
> I think this is getting difficult -

It's not difficult, it's just using the right tools.... :-)

> all I originally asked for was a
> simple xHarbour function where if I pass a string/array, it returns a
> GUI message, with an OK button.

... and if you only need this you don't need a GUI library !!!

> Maybe I should give up on GUI, and stick to my xHarbour-compiled
> clipper files.

I will have a look if it is possible to have this messagebox... but
don't call it "GUI"...

Francesco

Enrico Maria Giordano

unread,
Jan 18, 2009, 11:54:35 AM1/18/09
to

"SidReynolds" <si...@optusnet.com.au> ha scritto nel messaggio
news:be88c6ca-d2ee-43be...@u18g2000pro.googlegroups.com...

FUNCTION MAIN()

MESSAGEBOX( "This is a messagebox!" )

RETURN NIL


#pragma BEGINDUMP

#include "windows.h"
#include "hbapi.h"


HB_FUNC( MESSAGEBOX ) // cMessage, cTitle
{
MessageBox( 0, hb_parc( 1 ), "Information", MB_OK |
MB_ICONINFORMATION );
}

#pragma ENDDUMP

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page: http://www.emagsoftware.it/emgmusic


SidReynolds

unread,
Jan 18, 2009, 10:16:25 PM1/18/09
to
On Jan 19, 3:54 am, "Enrico Maria Giordano"
<e.m.giord...@emagsoftware.it> wrote:
> "SidReynolds" <s...@optusnet.com.au> ha scritto nel messaggionews:be88c6ca-d2ee-43be...@u18g2000pro.googlegroups.com...

Hi Enrico,
Thanks for that code - getting there!
Just a couple of points:
-The message doesn't sit on top of my program's screen (ie it's away
from the program window) - how I ensure it stays/sits with my program?
-When I added code to my main program, the window didn't appear at all
- it was created but minimised. How do I ensure it is visible (as well
as sits on program)?
-How do I create a multi-line message (eg passing array, not string)?
-Is there any documentation on MessageBox() and what the various
arguments are? (It's not in xHarbour Language Ref, and most of that is
in some foreign language)
Regards, Sid

FP

unread,
Jan 19, 2009, 2:46:44 AM1/19/09
to

>> HB_FUNC( MESSAGEBOX ) // cMessage, cTitle
>> {
>> MessageBox( 0, hb_parc( 1 ), "Information", MB_OK |
>> MB_ICONINFORMATION );
>>
>> }

MessageBox is a call to the Win32 function, so you can read its
documentation on:
http://msdn.microsoft.com/en-us/library/ms645505.aspx

Francesco

PS: this part is C code not xHarbour.

SidReynolds

unread,
Jan 19, 2009, 3:52:45 AM1/19/09
to

Hi Francesco,

Per chance I had googled and found the above link before I received
your post.
Unfortunately not having much C experience (because Clipper is so
great!), it didn't make much sense...

But I looked at some sample code at the link where 2 lines of message
appeared ie
int msgboxID = MessageBox(
NULL,
(LPCWSTR)L"Resource not available\nDo you want to try again?",
(LPCWSTR)L"Account Details",
MB_ICONWARNING | MB_CANCELTRYCONTINUE | MB_DEFBUTTON2
);
but the MessageBox call looks wrong.. ie 1st argument here is NULL,
but in our call


MESSAGEBOX( "This is a messagebox!" )

is the first (and only) argument is a string.

So I tried changing "This is a messagebox!" to "Resource not available
\nDo you want to try again?"
in order to try to make it 2 lines ie my limited C knowledge recalls
"\n" is a line separator.
But it still only printed 1 line.

I then tried including the mysterious (LPCWSTR)L in my code, and it
wouldn't compile.

Any advice?

Regards, Sid

FP

unread,
Jan 19, 2009, 4:50:34 AM1/19/09
to

MESSAGEBOX( "This is a messagebox!" + chr(13)+ "second line" )

In c the chars "\n" are converted to a single byte...

... and NULL == 0 so the first parameter is OK.

Francesco

SidReynolds

unread,
Jan 19, 2009, 5:32:02 AM1/19/09
to

Hi Franceso,
It works - and I tested it with 4 lines and it works too - great!!!
Just my other question again... how can I ensure the message window
sits within the 4 corners of my program window (preferably
centrally)?
Currently the position seems random ie sometimes in, then out next
time.
Regards, Sid

FP

unread,
Jan 19, 2009, 6:41:48 AM1/19/09
to
> Currently the position seems random ie sometimes in, then out next
> time.

I don't know how to set a position for the messagebox, I don't think it
is ever possible !
To have it in front of other windows you can try several parameters -
you find them in the cited microsoft web site, for example MB_TOPMOST or
MB_SETFOREGROUND and MB_TASKMODAL

Francesco

SidReynolds

unread,
Jan 19, 2009, 7:43:31 AM1/19/09
to

Thanks for all your help.

Enrico Maria Giordano

unread,
Jan 19, 2009, 2:45:25 PM1/19/09
to

"SidReynolds" <si...@optusnet.com.au> ha scritto nel messaggio
news:7797565d-2740-4833...@z6g2000pre.googlegroups.com...

> -The message doesn't sit on top of my program's screen (ie it's away
> from the program window) - how I ensure it stays/sits with my program?

I'm not sure but I think that MessageBox() API always goes to the center of
screen.

> -Is there any documentation on MessageBox() and what the various
> arguments are?

Yes, on MSDN.

Enrico Maria Giordano

unread,
Jan 19, 2009, 2:48:54 PM1/19/09
to

"SidReynolds" <si...@optusnet.com.au> ha scritto nel messaggio
news:8e9c60e4-f93a-4747...@v5g2000prm.googlegroups.com...

> So I tried changing "This is a messagebox!" to "Resource not available
> \nDo you want to try again?"
> in order to try to make it 2 lines ie my limited C knowledge recalls
> "\n" is a line separator.
> But it still only printed 1 line.

Use CHR( 13 ) instead.

SidReynolds

unread,
Jan 19, 2009, 6:43:57 PM1/19/09
to
On Jan 20, 6:45 am, "Enrico Maria Giordano"
<e.m.giord...@emagsoftware.it> wrote:
> "SidReynolds" <s...@optusnet.com.au> ha scritto nel messaggionews:7797565d-2740-4833...@z6g2000pre.googlegroups.com...

Hi Enrico,
Thanks for that.
You are right - it seems the message window is positioned in middle of
whole screen... so maybe I should change my question to:
"How do I also ensure my Clipper program built using xHarbour also
positions the program window in the middle of the screen?"
Currently, xHarbour tends to display them toward the top left side.
Cheers, Sid

SidReynolds

unread,
Jan 20, 2009, 12:15:40 AM1/20/09
to

Also so the text in the the window is a little small. Is there some
way to enlarge it?

Enrico Maria Giordano

unread,
Jan 20, 2009, 5:48:03 AM1/20/09
to

"SidReynolds" <si...@optusnet.com.au> ha scritto nel messaggio
news:d674d9a4-133d-4bf7...@r36g2000prf.googlegroups.com...

> "How do I also ensure my Clipper program built using xHarbour also
> positions the program window in the middle of the screen?"
> Currently, xHarbour tends to display them toward the top left side.

Try to set the console properties.

Enrico Maria Giordano

unread,
Jan 20, 2009, 5:50:30 AM1/20/09
to

"SidReynolds" <si...@optusnet.com.au> ha scritto nel messaggio
news:d04c6de4-0e45-4be1...@g1g2000pra.googlegroups.com...

> Also so the text in the the window is a little small. Is there some
> way to enlarge it?

No, as far as I know.

SidReynolds

unread,
Jan 20, 2009, 6:01:39 AM1/20/09
to
On Jan 20, 9:50 pm, "Enrico Maria Giordano"
<e.m.giord...@emagsoftware.it> wrote:
> "SidReynolds" <s...@optusnet.com.au> ha scritto nel messaggionews:d04c6de4-0e45-4be1...@g1g2000pra.googlegroups.com...

>
> > Also so the text in the the window is a little small. Is there some
> > way to enlarge it?
>
> No, as far as I know.
>
> EMG
>
> --
> EMAG Software Homepage:    http://www.emagsoftware.it
> The EMG's ZX-Spectrum Page:http://www.emagsoftware.it/spectrum
> The Best of Spectrum Games:http://www.emagsoftware.it/tbosg
> The EMG Music page:        http://www.emagsoftware.it/emgmusic

Thanks

0 new messages