Image for Combobox from Resource

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

Image for Combobox from Resource

Post by AUGE_OHR » Wed Feb 12, 2020 2:13 am

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: 592
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 75 times
Been thanked: 129 times

Post by AUGE_OHR » Thu Feb 13, 2020 10:06 am

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

Post Reply