Custom CUI files
hi,
I was wondering if there is a way to display icons for toolbars/menus other then using BMP's for a custom CUI file. Is f.e. a custom resource file possible ?
thx
Comments
-
Yes that is possible. The resource dll holding your BMPs should have the same name as the CUI: for example 'MyStuff.cui' can access resources in 'MyStuff.dll'.
In the CUI editor select the image property then press the [...] button to open the Tool Image dialog. The Tool Image dialog has 4 options (Builtin, Bitmap file, Resource, None). Select 'Resource'; if all is well you should see the bitmaps; if not there is a problem with your resource dll.
Your resource dll (MyStuff.dll) will be found if it is located in the same directory as the CUI file (MyStuff.cui) or if it is reachable via the search path.0 -
Two interesting links if you want to create your own toolbar dll
http://www.afralisp.net/vbaa/vba15.htm (VB6)
http://www.afralisp.net/vbaa/vbadll.htm (for non-programmers)0 -
ok thx
0 -
I've been dragging around a bunch of custom toolbar bitmaps for years now because of the hassle of making & compiling a DLL file (since I'm VB6 challenged). The links that Roy provided points to old articles that although talk about revising MNU files, still work just fine for the concepts involved. The link using Resource Hacker is a releatively quick & painless method for making your DLL. After your DLL is made, using Bricscad's CUI editor to point to your new resource file for each of your bitmaps goes reasonably quickly as well.
I must say, it's nice to have just two files for my homemade toolbars. One partial CUI & one DLL.
Cool. Thanks.
0 -
HI Guys !
Being a non programmer I would find it extremly usful if there would be a support directory accessible (by default) that is outside the Userdata ../../..V9 , V10 ,V11.
I would like it just to be called userdata/././bricsys so that I can put my bmp´s there and my CUIs would be fine even after a update.
Today its a pain.
The problem is that even if I set a path the Cui uses the whole path down to the BMP on every icon. I e you have to go through every icon in your Cui files with every update.
Correct me if Im wrong here. ( I would be happy)
Patrik
0 -
No, you do not have to supply the full path to an image file.
Example 1:
If the search path contains this folder:
C:\AllMyBitMaps\
Using this image path:
MyFunction.bmp
Will find this image:
C:\AllMyBitMaps\MyFunction.bmpExample 2:
If the search path contains this folder:
\LispProjects\CopyBetweenPoints\
Using this image path:
CopyBetweenPointsBitmaps\CBPb.bmp
Will find this image:
\LispProjects\CopyBetweenPoints\CopyBetweenPointsBitmaps\CBP.bmpOf course a CUI is only a text-file. So if you have to change the path for a lot of images the easiest way is to use a good text editor and just do a search-and-replace
If you are building a CUI using the BC CUI editor and you don't want to store the full path to an image you can erase the first portion of the path.
0 -
Small error: CBPb.bmp should be CBP.bmp in my previous post (it's a pity you cannot edit your messages on this forum...)
0