Page 1 of 2

How to link icons to program?

Posted: Thu Dec 04, 2008 9:05 pm
by mol
Maybe my question is trivial, but I can't find how to link some icons to program?
Could somebody help me?

Re: How to link icons to program?

Posted: Fri Dec 05, 2008 9:05 am
by gfilatov
mol wrote:Maybe my question is trivial, but I can't find how to link some icons to program?
Could somebody help me?
Marek,

How about to including in your <programname>.rc the following string(s):

// Using a resource file like this, you can include bitmaps, icons and sounds
// inside EXE.
//
// Resource name Resource Type Resource FileName
//
WORLD ICON WORLD.ICO
...

Re: How to link icons to program?

Posted: Sat Dec 06, 2008 9:32 am
by mol
Going this way, I preperad .rc file, but in my opinion, it doesn't work.
If I declare icon in window definition, it appears.
But main program listed in folder has standard icon from ide.
My older project, linked with hmg 2.0 and older IDE has icon.

Maybe something with IDE ???

Re: How to link icons to program?

Posted: Sat Dec 06, 2008 10:13 am
by Rathinagiri
Had you mentioned all your resources in the IDE resources page of the Project Browser window? (instead of listing them in a .rc file)

Image

It works fine for me.

Re: How to link icons to program?

Posted: Sat Dec 06, 2008 1:48 pm
by mol
I have all resources placed in "Resrc." tab:
Image
but still only standard icon appears in my AKORD.EXE

Re: How to link icons to program?

Posted: Sat Dec 06, 2008 3:01 pm
by Rathinagiri
icon and ICON are the same? And, is there any empty space after the last line?

I don't understand why this happens. :(

Re: How to link icons to program?

Posted: Sun Dec 07, 2008 2:32 pm
by mol
thanks! it must be "ICON" not "icon" !!!
So simply then so hard to find error...

Best regards, Marek

Re: How to link icons to program?

Posted: Sun Dec 07, 2008 4:55 pm
by Rathinagiri
:) Happy that you had solved.

Re: How to link icons to program?

Posted: Thu Jan 08, 2009 6:50 pm
by Kimono59
Ok Hello to all on this forum
i'm new in programming hmg ide : excellent !
i have a problem with icons and bitmaps . I want to include the .bmp of my program in the executable:

Code: Select all

    DEFINE MAIN MENU
        DEFINE POPUP "File"
            MENUITEM "Open" ACTION MsgInfo("Open") IMAGE "info.bmp"
            MENUITEM "Save" ACTION MsgInfo("Save") IMAGE "free.bmp"
            SEPARATOR
            MENUITEM "Exit" ACTION ThisWIndow.Release IMAGE "exit.bmp"
        END POPUP
        DEFINE POPUP "Help"
            MENUITEM "About" ACTION MsgInfo("HMG IDE - Menu Designer")
        END POPUP
    END MENU

END WINDOW
I have include in the ressource of program the list of them like
OPEN BITMAP INFO.BMP
SAVE BITMAP FREE.BMP etc..
But these bitmaps don't link in the exe
(i have try with an rc file but the same pb)
However when i use the resource witn :
WORLD ICO SOMETHING.ICO : no problem
thank's in advance
regards, jean-michel kimono59

Re: How to link icons to program?

Posted: Wed Jan 21, 2009 6:45 pm
by Kimono59
Bon a priori on ne veut pas me répondre, dommage, merci quand même !