Re: SetMapMode
- From: "Steve" <sredmyer@xxxxxxxxxx>
- Date: 23 Mar 2007 16:18:31 -0700
On Mar 23, 6:15 pm, "Mike Williams" <m...@xxxxxxxxxxxxxxxxx> wrote:
"Steve" <sredm...@xxxxxxxxxx> wrote in message
news:1174686194.123601.256540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am creating an ActiveX dll which will draw an animated book
representation on the window given and at the coordinates given.
By animated book I mean that the turning of a page will be
animated. The book has user definable images for the . . .
Well that's a fairly ambitious project, certainly not trivial. The first
question I would ask is how you intend to use the window which the user
specifies? Do you intend to draw the animated book at a suitable scale so
that each page fits fully within the window at its current size, or do you
perhaps intend to resize the window so that it more comfortably "fits the
page"? And how does your control get the details of the book it is intended
to display? Is the text itself part of your dll, or is it supplied in some
way by the application which "calls" your library?
I started this project for a specific task I am working on
(a libray of my mp3 collection to be used in an mp3 player
app I am writing) . . .
That's interesting. How do you intend to play and control these mp3s? Have
you checked out the ActiveMovie type library. I have only a very limited
experience with it myself, but from what I've seen so far it is very good.
Mike
The dll exposes an object model that the developer will use to define
the size and position of all of the elements of the book. At the top
of this hierarchy is the book it self. The developer would specify
where and at what size and in what window the book is to be drawn.
The developer then adds elements (ie. cover, spline, pages) to the
book. Each of these elements are objects within the hierachy. For
each of the objects the developer defines a size and position. These
size and position coordinates though are relative to the books client
area. IOW if I were to create a page object I would tell the dll to
create it and place it at 0,0 and give a height = to the books
ClientHeight and a width = to 1/2 the books width minus 1/2 the width
of the spline. This would place it at the books upper left corner and
it would extend to the books center. Although there is nothing
preventing it, making a page object wider than half the book would be
silly. Any object whose position or size places it outside of the
book simply will not have that portion shown as the drawing routines
create clipping regions which at the most libral state is the bounds
of the book. So the book "contains" both pages and a spline. The
pages "contain" three child objects.
Firstly they contain an object representing the top caption (this
would be used, for instance, on the cover page to display the books
title). A second caption defined as bottom caption by name (but again
by setting it's size and position properties it can be placed
anywhere) is also provided. Both of these caption objects expose
properties to define not only where (within the page) they should be
drawn but with what font, forecolor, backcolor, etc.. Finally a page
object contains an image object. The image is defined (by the
developer) by specifying it's size and position (relative to the page
since it is contained by the page). Further the developer specifies a
image source and an image source type. The source type can be either
a file (ie bmp, jpg, etc I would use this to display the Album art in
my mp3 player) or a window (I will use this in my mp3 player to show
the list box which holds the list of tracks on a particular CD). This
list of tracks is actually sourced from a list box in the host
application. And although it will be simply a graphical
representation of that list box while the page is being turned, once
the page is fully turned and the list fully visible the actual list
box will be placed over it and made visible. The last source type is
Resource. This type will signify that the developer has choosen to
use one of the stock images included in a resource file compiled into
the dll.
In my mp3 player app I will basically have two types of pages (plus
the cover page). The first type would show the album art for a cd
with a top caption showing the albums title and a lower caption
showing the artist. The second type of page would define no captions
and instead show only the list of tracks on a CD.
Yes this whole thing has turnned into quite a project...but it is fun.
As for the actual playing of the mp3s that portion is already done. I
use the winmm API. This entire application (which I call the JukeBox)
is nearly done (this book peice being the last part) and when finished
will run on my Home Theater PC which is connected to my 50" plasma.
It therefore needs some form of screen saver (plasma's burn in easy).
I have written my own self styled "screen saver" that shows the
currently palying songs album art along with the song title and artist
and a play progress indicator. An additional image (identical except
no progress indicator) shows the song next up in the play list.
My goal with this version (i have already written a version which I
have been using for a couple of years) was to remove all dependancies
on non native VB or windows libraries. That is partly why I choose
not to do this as an OCX (origianlly it was just going to be classes
in the large monolithic app). Anyway the final thing will reference
no external dlls (other than those written by me) and have no OCX
dependancies either.
If you are interested I would be happy to send you a zip file of what
I have to get your opinion.
PS. Sorry about the length of this post.
Thanks,
Steve
.
- Follow-Ups:
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- References:
- SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- Re: SetMapMode
- From: Steve
- Re: SetMapMode
- From: Mike Williams
- SetMapMode
- Prev by Date: Re: VBsight GradFrameCTL error in VB ide
- Next by Date: Re: SetMapMode
- Previous by thread: Re: SetMapMode
- Next by thread: Re: SetMapMode
- Index(es):
Relevant Pages
|