Announcement

Collapse
No announcement yet.

program icon

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • program icon

    Without using a shortcut, please how do I associate an icon with an executeable so that it appears in the Windows start menu?
    Code:
    ............WM_SETICON, %ICON_SMALL 
    ............WM_SETICON, %ICON_BIG
    apparently serve only to put the icon on the caption bar. I'm not using a resource file and would prefer to avoid doing so, if possible.

  • #2
    Originally posted by Chris Holbrook View Post
    I'm not using a resource file and would prefer to avoid doing so, if possible.
    But thats the only way, i think.

    i remember, someone wrote that windows will use the first icon of resouce-file as executable-icon.
    Last edited by Daniel Gieseler; 2 Sep 2008, 05:55 AM.
    www.flagranto.de

    Comment


    • #3
      i remember, someone wrote that windows will use the first icon of resouce-file as executable-icon.
      Actually I believe its the 1st icon found AlphaNumerically. AKA if you have an Icon named ApplicationIcon (which is 1st), and an icon named AppIcon (which is 2nd), the icon used would be AppIcon. (Even though it came second)
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        Code:
        ///  myprog.rc 
        
        __program     myprog.ico   // two underscores ought to make it sort first
        other            other.ico
        ....
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Originally posted by Cliff Nichols View Post
          (...)if you have an Icon named ApplicationIcon (which is 1st), and an icon named AppIcon (which is 2nd)(...)
          Are you sure? In my alphabet an "i" comes before an "l", so AppIcon comes before ApplicationIcon. Upper/lowercase makes no difference.

          Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
          http://zijlema.basicguru.eu
          *** Opinions expressed here are not necessarily untrue ***

          Comment


          • #6
            >In my alphabet an "i" [eye] comes before an "l" [el],

            Harrumph. Foreigners!
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Harrumph. Foreigners!
              Now Now MCM, it could be true (but I would think the same (or similar) scenario is true no matter the language)

              That said, I know some words that mean the same but are spelled different (AKA, Germany may be I before E, but Americans spell it E before I sort of thing)
              but can the same be true of the alphabet????

              I have always seen the alphabet go
              ABCDEFGHIJKLMNOPQRSTUVWXYZ
              it may be in different order in other languages???

              Anyways from my example
              ApplicationIcon
              would come after
              AppIcon
              (or at least in the USA
              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "

              Comment


              • #8
                >Now Now MCM, it could be true

                I have some property in which you might be interested, too.
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #9
                  Cmon...I offered a valid point...you gotta admit that

                  Just because you stick to your fishbowl, does not mean the fishbowl is not contained in an ocean


                  For that matter...a lake...a pond, a bathtub, a sink, or just sitting on someones desk.....It all matters from the point of view that you are viewing it from of what "rules must apply"

                  Engineer's Motto: If it aint broke take it apart and fix it

                  "If at 1st you don't succeed... call it version 1.0"

                  "Half of Programming is coding"....."The other 90% is DEBUGGING"

                  "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                  Comment


                  • #10
                    Having just popped a new icon into a program, I have to ask why not use a resource file? I used to avoid them, but it's so flipping easy to make an .rc file and have PBWin create the .pbr file, I don't hesitate for a second. The downside is I quickly end up with programs having unique icons nobody else has, wav file sound effects and annoying messages like my old Nissan, "Door is a Jar".

                    Comment


                    • #11
                      >why not use a resource file?

                      1. I don't want to (learn to?) use a program resource.
                      2. I don't want to have to ship an external icon file with the application.

                      News Flash: If you want an icon, pick one, exactly one, and only one.
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Originally posted by Michael Mattias View Post
                        >I don't want to have to ship an external icon file with the application.
                        Not necessary. The compiled resource file (filename.pbr) is the way to include it in the executable. So, once compiled to an exe, the icon is part of it. Only in case you also want to ship the source code, you may want to include all the (re)sources.

                        Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
                        http://zijlema.basicguru.eu
                        *** Opinions expressed here are not necessarily untrue ***

                        Comment


                        • #13
                          So the resource file is unavoidable, pity.

                          Thanks to all!

                          Comment


                          • #14
                            Originally posted by Michael Mattias View Post
                            >why not use a resource file?
                            ...
                            News Flash: If you want an icon, pick one, exactly one, and only one.
                            Hmm, not entirly true..
                            Big and small icon would be the best.
                            But i am not talking about multiple ico files.
                            hellobasic

                            Comment


                            • #15
                              I foolishly 'assumed' context would be inferred by readers.. my bad.
                              ...please how do I associate an icon with an executeable so that it appears in the Windows start menu?
                              ===>

                              "If you want an icon to appear in Explorer and on the Start menu .... pick one.
                              Michael Mattias
                              Tal Systems (retired)
                              Port Washington WI USA
                              [email protected]
                              http://www.talsystems.com

                              Comment


                              • #16
                                Originally posted by Michael Mattias View Post
                                I foolishly 'assumed' context would be inferred by readers.. my bad.


                                ===>

                                "If you want an icon to appear in Explorer and on the Start menu .... pick one.
                                Haha, now i don't get it as well!
                                >Without using a shortcut

                                Usually items in the start menu *are* shortcuts!
                                Of course.. soon the discussion will continue about embedding icons in an exe..
                                hellobasic

                                Comment


                                • #17
                                  >Of course.. soon the discussion will continue about embedding icons in an exe..

                                  A thread drifting? Here?

                                  No way!
                                  Michael Mattias
                                  Tal Systems (retired)
                                  Port Washington WI USA
                                  [email protected]
                                  http://www.talsystems.com

                                  Comment


                                  • #18
                                    Originally posted by Edwin Knoppert View Post
                                    Haha..Usually items in the start menu *are* shortcuts!
                                    Explorer, right click on application, select "pin to start menu". The icon displayed is the same as the Explorer one.

                                    Comment


                                    • #19
                                      I suppose you could use "DATA" and a work-around But......

                                      MUCH MUCH MUCHHHhhhh easier using a resource file (although I am weak at it myself, but enough to make it work, so its fairly easy)

                                      The added bonus...you can actually make an EXE with no Installs, no 3rd party Installation programs, no nada....

                                      The bad part...do you want to learn how to do it that way??? or do you you want to make a truly "Stand Alone" app that needs no outside influence??? (outside PB and their wonderful staff of "Works AS ADVERTISED" because it works as it is stated, and helps us slowly learn what M$ may document (but they must have lawyers do the documentation, because I can spend days looking at a function and still wonder what it means, but then read PB explain it and go "OK...WHY do the MSDN docs make it sooooooo confusing????")

                                      All in all...Resource files are your friend...how you interpret them...that can be a problem.
                                      Once you get it though (or to the level you need it), then you get it, the next step is WHY???? does it work as advertised, and what did you do to break it while trying to learn how to make it work???
                                      Engineer's Motto: If it aint broke take it apart and fix it

                                      "If at 1st you don't succeed... call it version 1.0"

                                      "Half of Programming is coding"....."The other 90% is DEBUGGING"

                                      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                                      Comment


                                      • #20
                                        oh and the goooood part.....
                                        Once you get it....you don't have to depend on 3rd party (and rule out mistakes that are not your own)

                                        Only drawback I have seen are customers wondering where their "Uninstall program" is when they try to update a program, and their amazement to my reply of "Just delete and run the new one, or save to the same place and run"

                                        They are soooooooo amazed I have to laugh

                                        (for the ones that are paranoid, I just explain that they can delete the prior with no uninstall...but maybe Its something I should add in just not to freak them out????)
                                        Engineer's Motto: If it aint broke take it apart and fix it

                                        "If at 1st you don't succeed... call it version 1.0"

                                        "Half of Programming is coding"....."The other 90% is DEBUGGING"

                                        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                                        Comment

                                        Working...
                                        X