Using ICO files in MDL

This post has the same name as an archived topic that should become active again until there is a solution (http://communities.bentley.com/products/microstation/microstation_programming/f/19569/p/66261/169579.aspx#169579). I was lucky to find it and it has saved me the hours I would have spent trying to make this work.

If it is possible to unarchive that thread and add it to this one hopefully Bentley will do that.

I will not regurgitate all the content of the archived post but in a nutshell, we would like to link the RSC file created from .ICO files by wiconpackager directly into an .MA application as we can do with pure .R (ascii format) icons. That way a single .MA file can be distributed without other files and without setting uStn environment variables to point to the external icon files.

BTW - I am aware of dgnlib and dll solutions - please do not reply to this post with comments relating to those.

  • Unknown said:
    we would like to link the RSC file created from .ICO files by wiconpackager directly into an .MA application

    If you have created a MicroStation .rsc then you link it in your bmake file.  Add your icon.rsc to the list of resource files that are linked by rlib.exe.

    This article provides a summary of using Windows icons with MDL.

     
    Regards, Jon Summers
    LA Solutions

  • Jon,

    don't know if you ever tried this, but even for me this is not working. I have to set up MS_ICONRSCLIST and provide the destination for the rsc created from wiconpackager. Merging the rsc via bmake will result in empty icons. Don't know why this wasn't brought to the end, but in fact I tried so different things, so many times, that in the end I live with the external rsc and the expanded MS_ICONRSCLIST.

    Loren, until anyone else will show us how this might be achived, I fear this will not work in another way.



  • Michael Stark said:
    Don't know if you ever tried this, but even for me this is not working

    You're right!  Even though I merge the icon resource with the MDL app., MicroStation still looks for \icons\AppName.rsc.

    Michael Stark said:
    Merging the rsc via bmake will result in empty icons

    I agree.  My mistake was to assume that the merge had worked, but I forgot to delete \icons\AppName.rsc when testing the application.  The resource merge may or may not work, but we don't know because MIcroStation does not examine AppName.rsc for .ICO icons.

    Why can't we use an .ICO icon resource embedded in our own application?  If we can do that for MDL icons it is illogical not to be able to do the same for other icons.

     
    Regards, Jon Summers
    LA Solutions

  • Michael Stark said:
    Don't know if you ever tried this ...

    If you read the original question, which is "We would like to link the RSC file created from .ICO files by wiconpackager directly into an .MA application as we can do with pure .R (ascii format) icons", then you will understand that I answered it precisely. However, that wasn't exactly what the questioner had in mind.

    That reminds me of a joke.

    Balloon Pilot

    The pilot of a hot-air balloon is lost. The weather has turned cloudy and foggy. In an attempt to navigate he slowly descends until he can see the ground. It turns out that he is just above a golf course. He can see two people below him, playing golf.

    "Excuse me", shouts the balloon pilot, "Can you tell me where I am?"

    "Yes, shouts back one of the golfers. You're in a balloon, one hundred feet above a golf course"

    The balloon pilot shouts back, "You must work in IT."

    "You're right!" replies the golfer. "But how did you know that?"

    "Because", says the balloon pilot, "your answer is perfectly accurate and at the same time completely useless."

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions