Page 1 of 1

Image for Combobox from Resource

Posted: Wed Feb 12, 2020 2:13 am
by AUGE_OHR
hi,

i try to use Resource file instead of "file-from-Disk"

it work when i use this Syntax

Code: Select all

   AADD( acImage, "RES\IcoDriveUnknown16.ico" )
   AADD( acImage, "RES\IcoDrive16.ico" )
my *.RC look like this
A1MAIN ICON RES\NCC.ico
ICOUNKNOWN ICON RES\IcoDriveUnknown16.ICO
ICOFIXDRIVE ICON RES\IcoDrive16.ICO
so i try this

Code: Select all

   AADD( acImage, "ICOUNKNOWN"   )
   AADD( acImage, "ICOFIXDRIVE"  )
or this

Code: Select all

   AADD( acImage, LOADRESOURCE(GetInstance(),ICOUNKNOWN  ) )
   AADD( acImage, LOADRESOURCE(GetInstance(),ICOFIXDRIVE ) )
but both give "none" Result :(

who can tell me how to use Resource for Combobox :idea:

Re: Image for Combobox from Resource

Posted: Thu Feb 13, 2020 10:06 am
by AUGE_OHR
hi,

i have try other Way : BMP instead of ICO

now i can use Resource "Name" and got my Image for Combobox :D

again i wonder ... i can use BMP or ICO but only BMP with Resource "Name" ... hm

Re: Image for Combobox from Resource

Posted: Tue Mar 24, 2020 2:11 pm
by mol
Something must be wrong in your code.
I'm using icons from resource by name and it works.

Re: Image for Combobox from Resource

Posted: Wed Mar 25, 2020 3:24 am
by AUGE_OHR
hi,
mol wrote: Tue Mar 24, 2020 2:11 pm Something must be wrong in your code.
I'm using icons from resource by name and it works.
i also use Icon "by name" but ComboBox IMAGE does not accept ICOxxx.ICO only MYxxx.BMP (made from ICO)

Re: Image for Combobox from Resource

Posted: Sat Mar 28, 2020 9:40 am
by hansmarc
Hi,

i had the same problem in hmgextended.

Look here for more deails with tests we have done :

https://groups.google.com/forum/#!topic ... QV0dZYgL7I

It seemes to be a problem with the Borland 5.8 linker.
When you link with Winmg all is ok. See pictures.

The problem is still there. No time to investigate so i use bmp now.

Bye
Hans