Author Topic: bleepin cui toolbar icons!  (Read 1830 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7531
bleepin cui toolbar icons!
« on: August 27, 2007, 11:59:16 AM »
It it just me, or do cui's and icons that reside in a dll file not play well together? I thought I finally had this working...but this morning there are random buttons that have that cloud icon with the question mark in it and I cannot get them to show the icons :realmad:. Does anyone have any tips or tricks to get this to work.

The dll file is named the same as my cui and resides in the same directory.
I've tried deleting the associated .mnr file to recompile.
I've double checked to make sure the resource exists in my dll file.


Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC


DanB

  • Bull Frog
  • Posts: 367
Re: bleepin cui toolbar icons!
« Reply #2 on: August 27, 2007, 12:29:28 PM »
Sorry I don't have a fix for you although we have had random issues with missing icons as well. Sometimes it's a little easier knowing someone else can relate.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: bleepin cui toolbar icons!
« Reply #3 on: August 27, 2007, 12:41:23 PM »
Are you pathing to your images somehow?  I checked mine, and all I have is the imagename inthe CUI.  Is it possible your dll lost the image info?  Have you verified the image is in the DLL with the correct name?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

ELOQUINTET

  • Guest
Re: bleepin cui toolbar icons!
« Reply #4 on: August 27, 2007, 12:59:35 PM »
i don't use resource hacker and dll anymore if that's what you mean. i just set my custom icon location in options and all is well. I took the path out of the bitmap field in cui so if I ever want to change the location I can. I had problems in the past (2006 version) when I first installed toolbars the image wouldn't show but once I specified the path for one or two the rest find their way. In 2008 haven't had this problem

ronjonp

  • Needs a day job
  • Posts: 7531
Re: bleepin cui toolbar icons!
« Reply #5 on: August 27, 2007, 01:19:05 PM »
Are you pathing to your images somehow?  I checked mine, and all I have is the imagename inthe CUI.  Is it possible your dll lost the image info?  Have you verified the image is in the DLL with the correct name?

My resource is not pathed (since it's in a dll file)...I just double checked the dll file and the image is in there with the correct name?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: bleepin cui toolbar icons!
« Reply #6 on: August 27, 2007, 02:28:34 PM »
Is it somehow possible you have 2 dll files, and its finding the wrong one?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

ronjonp

  • Needs a day job
  • Posts: 7531
Re: bleepin cui toolbar icons!
« Reply #7 on: August 27, 2007, 04:20:02 PM »
I think my issue may have stemmed from doing some work on a Vista computer a couple of weeks ago.....I have these strange resources named "0" that are duplicates. When I delete these duplicates, ResHacker will not read the dll anymore?

This little app weeded out the resources that went wonky:
http://www.wilsonc.demon.co.uk/d10resourceeditor.htm

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ronjonp

  • Needs a day job
  • Posts: 7531
Re: bleepin cui toolbar icons!
« Reply #8 on: August 28, 2007, 10:48:16 AM »
Thought someone else might need this someday as it saved me tons of time  :-)

I threw together this lisp to write a reshacker script that will delete all existing BMP resources from an existing DLL and add a directory of bitmaps to it. The script still has to be called from the command line to create the NEW-* DLL file. Syntax is included in an alert box at the end of the routine.

Code: [Select]
(defun c:reshackerscript (/ fname dir dirlist file cntr dll dllnew)
  (setq fname
(getfiled
   "Select a DLL to process (BMPS must reside in same directory)"
   ""
   "dll"
   8
)
  )
  (if fname
    (progn
      (setq dir     (vl-filename-directory fname)
    dll     (strcat (vl-filename-base fname) ".dll")
    dllnew  (strcat "NEW-" dll)
    dirlist (vl-directory-files dir "*.bmp")
    file    (open (strcat dir "\\reshackerscript.txt") "w")
    cntr    0
      )
      (progn
(write-line
  (strcat "[FILENAMES]\nEXE="   dll
  "\nSAVEAS="   dllnew
  "\nLOG=\n\n[COMMANDS]\n"
  "-delete   BITMAP,,0"
)
  file
)
(repeat (length dirlist)
  (setq fname (nth cntr dirlist))
  (write-line
    (strcat "-addoverwrite "
    fname
    ", BITMAP,"
    (vl-filename-base fname)
    ",0"
    )
    file
  )
  (setq cntr (1+ cntr))
)
(close file)
      )
      (alert (strcat "Script file located in: " dir))
      (alert
(strcat
  "Reshacker commandline script syntax:
  \n\n(dir)reshacker.exe -script reshackerscript.txt\n\n
  It's easiest if reshacker.exe, BMP files and reshackerscript.txt
  all reside in the same directory."
)
      )
    )
  )
  (princ)
)

Enjoy!

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC