Re: Nubee, and Challenged

new topic     » goto parent     » topic index » view thread      » older message » newer message

ET,

Irv's suggestion is probably the best, along with "look at Win32Lib", but
here's the best I could do within the context of the DEMO "Window.exw" :

1.  add: DT_WORDBREAK =  #0010
     to
     constant DT_SINGLELINE = #0020,
  DT_CENTER     = #0001,
  DT_VCENTER    = #0004

so it looks like:

constant DT_SINGLELINE = #0020,
  DT_CENTER     = #0001,
  DT_VCENTER    = #0004,
  DT_WORDBREAK =  #0010 --16

Then, to the place the text message is defined, add this:
sequence someText
someText = "A Plain Vanilla Window using Euphoria!\n"
someText = someText & "This is a new line of text."

then change the "allocate_string" line to look like this:
Euphoria = allocate_string(someText)

then in the line starting : c_proc(DrawText, {hdc, Euphoria,
replace the DT_SINBLELINE with DT_WORDBREAK  so it looks like this:

 c_proc(DrawText, {hdc, Euphoria, -1, rect,
     or_all({DT_WORDBREAK, DT_CENTER, DT_VCENTER})})


Unfortunately, it now *doesn't* vertically center the two lines of text,
don't know why, maybe someone else does, and maybe there's a better way,
too.

Dan Moyer

----- Original Message -----
From: "ET" <et54 at mumctville.org>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, August 25, 2001 9:49 AM
Subject: Nubee, and Challenged


>
> Hi Folks,
> Am extremely new here.  Have been tinkering with
> the DEMO "Window.exw" I'd like to use it as an
> unavoidable message window.  I have been able to
> make it work fine with short messages from the
> command line, but am stuck at making it display a
> multiline message (word wrapped).  I plan to read
> the messages from a file, but I'm not asking about
> that.  Yet.
>
> Thanks for your time.  (ET)
>
> stumblin, fumblin, bumblin, but step, and step
> again
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu