Announcement

Collapse
No announcement yet.

Program icons

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

  • Program icons

    I do know how to create a resource file and load icons/bitmaps/... at run-time. The question is about the not-run-time icons. Windows shows a 32x32 pixel icon on the desktop, and a 16x16 pixel icon on the explorer. I want to draw both, but I can't find a reliable way to make Windows show them correctly. I couldn't find this information in this forums... Can someone help me? Thanks.

    ------------------
    Rgds, Aldo

  • #2
    Have you tried DrawIconEx? Something like:
    Code:
    DrawIconEx hDC, left, top, hImg, width, height, 0, BYVAL 0, %DI_NORMAL
    Where width, height can be 32x32 or 16x16, whatever. I think best is
    to use 32x32 icons in resource and DrawIconEx with 16x16 when needed.


    ------------------

    Comment


    • #3
      Borje,

      my problem is not to draw an icon by program. I want to be certain which icons will be displayed on the desktop and showed by explorer-like programs (these icons are independent from the executable code). I don't like automatic zoom (32x32 to 16x16 or vice-versa); I would like to declare both icons into the resource file.

      ------------------
      Rgds, Aldo

      Comment


      • #4
        It looks that question is about, how Explorer selects icons, embedded into Exe.
        In my impression, in early releases Explorer searched an icon with name PROGRAM.
        But, for example, in Win2000 Explorer takes first icon in alphabetic order.


        ------------------
        E-MAIL: [email protected]

        Comment


        • #5
          Semen,

          this is a simple to solve problem: one can put an icon labeled PROGRAM - all others labeled with the starting letter from "Q"... I'll try it. Do you know also which is the icon shown on the desktop? or I must create a double icon and use it with the "label rule" stated above?

          ------------------
          Rgds, Aldo

          Comment


          • #6
            Aldo --

            I use icons with three sizes 16 * 16, 32 * 32, 48 * 48 and to avoid problems:
            1) include PROGRAM
            2) the same icon with name , let's say, A
            3) do not use numeric id. (if letters only, sorting order is 100% clear).


            ------------------
            E-MAIL: [email protected]

            Comment

            Working...
            X