Image for Combobox from Resource

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 1148
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 212 times
Been thanked: 310 times

Image for Combobox from Resource

Post 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:
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 1148
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 212 times
Been thanked: 310 times

Post 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
have fun
Jimmy

User avatar
mol
Posts: 3436
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 279 times
Been thanked: 177 times
Contact:

Post by mol »

Something must be wrong in your code.
I'm using icons from resource by name and it works.

User avatar
AUGE_OHR
Posts: 1148
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 212 times
Been thanked: 310 times

Post 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)
have fun
Jimmy

hansmarc
Posts: 13
Joined: Thu Jun 23, 2016 5:38 am
Location: Belgium
Been thanked: 26 times

Post 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

Post Reply