Re: analog dials, vu meter etc...

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

don cole wrote:
> 
> Al Getz wrote:
> > 
> > 
> > Hi Rubens,
> > 
> > I was recently thinking of adding that stuff into WinClass because
> > i had a few people ask about this kind of display and currently
> > there is no class for this.  This is however a 7 segment class
> > that displays digits that look like 7 segment digits like
> > on a calculator or something and the size and color can be changed
> > to just about anything.  I didnt care too much about this myself,
> > but after looking into it and creating the class it came out
> > pretty cool looking, and it's easy to add 7 segment digits to
> > a program now.
> > I'd like to do the same thing with the 'round' analog displays,
> > and perhaps those zero center VU meter like displays too.
> > They do add something nice to a program.
> > 
> > Oh yeah, the program where the 7 segment digits came in handy
> > was my VoltageMonitor program, where voltages external to the
> > computer are measured using a special ic chip that i developed.
> > Originally it only used the standard Windows fonts but then
> > someone said, "hey why not make it look like an actual voltmeter",
> > so that's when i created the 7 segment digits class.
> > 
> > 
> > Al
> > 
> > E boa sorte com sua programacao Euphoria!
> > 
> > 
> > My bumper sticker: "I brake for LED's"
> > 
> 
>   One thing you can do with an analog meter that you can't do with a digital
> 
> meter is check the smoothness of a potentiometer.
> 
>   Just thought I'd throw that in.
> 
> Don Cole

Huh?
If you turn your potentiometer a notch, you'll get a response jump at some
point, and it will show just as well on an analog dial or a digital display,
won't it?

As far as Windows visuals are concerned: if you want the appearance of the round
dial (I thought you were referring to the gauges in the lower part of the
picture), hen adapting Greg's bigclock.exw is a good start - draw the dial on a
pixmap with the frame drawn in the transparency color, and transBlt() the pixmap
to your window on request).

If you'd like the dial to be a control on its own, then use a progressbar, trap
the custom draw notifications it will send and do the drawing yourself. Again,
the geometry is simpl and you can use bigclock.exw as a starting point. One thing
it doesn't handle is mouse clicks in the area which is not shown, between the
window frame and the clock proper. The program lacks a trap for WM_NCHITTEST that
would report that area as HT_TRANSPARENT so as to let the mouse clicks trickme
dow to the next window. Cursor shape changes are a little weird too.

CChris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu