Terry,

1. I always make a define at the top of my module like this:
Define FILE_DLL_ICONS   ApplicationDirectory$() & "MYAPP.DLL"

When I create a button that should use an icon from this dll, I refer to the 
constant:

Create ButtonPad "MYAPP" As
        PushButton
                Icon 11 File FILE_DLL_ICONS
                ...

2. The bitmaps should be 18*16 and 26*24 , so that explains the error you are 
getting now.
3. Sorry for being unclear here. The small bitmaps should have odd numbers and 
the large bitmaps should have even numbers, and you should always refer to the 
odd numbers in your code.

Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis

COWI har fået ny hjemmeside. Ydelserne GIS og IT, kort, kortlægning, 3D 
visualisering og arealforvaltning ligger under SAMFUND. Se mere her : 
www.cowi.dk

COWI has changed its homepage. Our services within cadastre and 
landadministration, geodataproducts, mapping and GIS can be seen under SOCIETY. 
See our services here: www.cowi.com


-----Original Message-----
From: Terry McDonnell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 30, 2005 12:35 PM
To: Peter Horsbøll Møller; [email protected]
Subject: RE: MI-L Unable to load external icon resource file


Peter

Thanks very much for getting back to me.  Your points below:

1. I don't specify any particular path to the resource file.  It exists in the 
same dir as the .MBX.  I've got rid of any other copies that may be confusing 
MI/MB (however, see below). How would I be more specific?  

2. My bitmaps are 16 X 16 and 32 X 32 as required, following the rules, as all 
the other bitmaps in the resource that display OK.

HOWEVER, since I got rid of any other copies, the error message has now moved 
on to:

"Bad Height for for bitmap 314.  Unable to load external icon resource" And the 
app crashes out.  This is the number of the larger bitmap.  I've confirmed (in 
Paint) that it is indeed 32 X 32.  I don't understand the error message.

3.  Sorry, I don't understand this at all.  How can ALL my bitmaps be named 1 
or 2.  As you can see from the code, I'd named them from 350 (I've now renamed 
them 313 & 314 - hence the number in the NEW error message).  Having said that 
you then say: 

"...2 (even number) for the large bitmap 4. In your code you should always 
refer to the small bitmap (the odd number) I think in your case the problem is 
caused by number 4"  

What's the 4 bit all about?  Where and how am I doing anything with 4 - 
whatever that means?

Thank you for your trouble and attention.

Best regards

Terry

-----Original Message-----
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2005 21:31
To: Terry McDonnell
Subject: RE: MI-L Unable to load external icon resource file

Terry,

A few things to try out:

1. I would recommend that you use a more specific path to the dll. Otherwise 
MapInfo might use a dll from the Windows or MapInfo program folder. 2. Make 
sure that the size of the bitmaps match the requirement, and that they are in 
pairs in the dll. 3. The bitmaps should be "named" 1 (odd number) for the small 
bitmap and 2 (even number) for the large bitmap 4. In your code you should 
always refer to the small bitmap (the odd number)

I think in your case the problem is caused by number 4


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16983

Reply via email to