Feature Request:
This is not a request for a Visual Dialect, or
anything remotely like the MS Visuals, but at least
for an enhancement that can allow the use of resources
in some fashion. Ideally, something like produced with
the Windows Resource Compiler but more practically
just a method to store bitmaps or other binary data in
the Dialect exe.
To that end, this is a specific feature request for
the controls that allow bitmaps, label and button, to
be able to accept a memory pointer as well as a file
name. This could be immediately useful with 'other'
methods of storing data.
Posted on the Dialect message board and SourceForge -
Fred
Logged In: YES
user_id=423153
The following may be a helpful link for the benefactor that
will implement this:
http://www.microsoft.com/msj/defaultframe.asp?
page=/msj/0198/hood0198.htm&nav=/msj/0198/newnav.htm
It appears possible to add resoureces to a copy of
Dialect.exe using e.g. Resourcehacker. Such added resources
could then be accessed during development of a program with
that copy. When an exe of that program is made the copy
with added resources then should be used as the interpreter
stub.
Until the wanted functionality is added to Dialect, a look
at http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/winui/resource_2i05.asp may be a good
start to derive which DLL functions of kernel32 need to be
used to access resources...
Andr
Logged In: YES
user_id=423153
It appears there is an undocumented feature in Dialect
allowing the use of resource pointers (or rather the bitmap
data type) with labels and buttons.
Where a label or button can access a bitmap using the
bitmap:<bmpfilepath> or <label>.bitmap =<filepath> it is
also possible to use bitmap:<bmpresource_number> or
<label>.bitmap = <bmpresource_number>.
There is standard only one such bmpresource_number, 128,
that point to a bitmap with the special iconbar used in
Dialect itself.
E.g.:
Import "gui"
w = gui.window("Bitmap...", [0, 0, 320, 240])
m = gui.bitmap( 245, 50 ) # create an empty bitmap
resourcebitmapnumber = 128
l = gui.label( w, "", [ 5,50,250,100] , {bitmap:m,
center:true })
b = gui.button(w,"", [5, 10, 250, 50], {
bitmap:resourcebitmapnumber})
b.onclick = func()
l.bitmap = resourcebitmapnumber
endfunc
gui.enter()
The user can add bitmap resources to Dialect.exe which can
be accessed in the same way.
When using Resourcehacker (free from
http://www.rpi.net.au/~ajohnson/resourcehacker/ ) the user
must first open Dialect.exe.
Then use Action->Add a new resource. In the menu that pops
up use the button "Open file with new resource..." to
select a .bmp bitmap file (other graphic files can not be
used with Dialect in the above described way).
Upon loading a correct bitmap, Resourcehacker shows the -
unalterable - resource type BITMAP. The user now must enter
a resource name, which should be a _number_ (e.g. 123 this
is needed for correct access with Dialect) that is unique
in respect to the bitmaps already in place. There is no
need to enter a resource language (a picture tells more
than a thousand words :). Finally click the button "Add
resource".
Put in more bimaps when needed using the above method.
When ready use File->Save as... to create a copy of Dialect
with the extra bitmap resources.
To use the extra bitmap resources the user must use the
copy that contains the added resources.
When creating an .exe that should be able to use the added
resources the user should take care to use as interpreter
stub the Dialect version with the resources.
Andr
(Note: As there may be a wild growth in personalized
versions of Dialect it may be wise to investigate the use
of saved resources (Resourcehacker can do this) that can be
added to source code that makes use of extra emmbedded
resources. The user could then avoid having to send a copy
of a complete - altered - Dialect but send the resourcefile
instead. The receiver would need Resourcehacker to load the
such a resourcefile to replace the existing resources.)