Hi Oliver,

This is not correct:

    image = .Image~getImage("IDB_BITMAP1") -- Create an image from the
bitmap
The first argument has to either be a number, in which case the number is
taken to be the resource ID of one of the system provided images, or a file
name.  Since this is not a number, (the getImage() method does not support
symbolic IDs at this time,) it is taken to be a file name.

If you add this to your message:

say "TestView-initDialog-02: image =" image 'err code:'
image~systemErrorCode
you will see this output:

TestView-initDialog-02: image = an Image err code: 2

The system error code, 2, is 'The system cannot find the file specified.'

Change to this and it works:

    image = .Image~getImage("CustList.BMP") -- Create an image from the
bitmap

By the way, I misread your code in your first e-mail and thought you were
printing Error when the returned image from setImage was .nil.  This code
that you have is correct:

if \ image~isNull then do
    oldImage = stImage~setImage(image)
    if oldImage \== .nil then oldImage~release
end
else do
    say "TestView-initDialog-03: Error! Image is Null!"
end

There is a couple of other gotchas in your approach.

1.)   The parser for .rc files ignores the BITMAP statement:

IDB_BITMAP1        BITMAP         ".\\CustList.BMP"

so there's no way to access a bitmap from a RcDialog.  If you compiled the
resource file into a resource only DLL, you could grab the bitmap image
using the .ResourceImage class.

Well, I guess that is only 1 gotcha.  There are currently methods to us an
Icon resource from a .rc file.  Matching methods for a bitmap can be added
as an enhancement in the future.

--
Mark Miesfeld


On Tue, Feb 14, 2012 at 4:06 PM, Oliver Sims <
[email protected]> wrote:

> **
> Many thanks, Mark.. Attached are the files. Run TestView.rex.
> Hope it's not me!!!
> The static has a style of WS_BORDER - I tried it without this style but no
> difference.
>
> --Oliver
>
>
>
>
>
>
>
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to