Windows 7 Having issue with shortcut icon and taskbar icon

Discussion in 'Programming and Scripting' started by changmeikuan, Apr 6, 2010.

  1. changmeikuan

    changmeikuan New Member

    Joined:
    Apr 6, 2010
    Messages:
    4
    Likes Received:
    0
    Hi,

    My application previously works well in XP. When I run it in Windows 7, I am facing some issue with taskbar icon.

    Please let me elaborate further. Let say the application executable is A.exe. A.exe can run on its own. It can accept some arguments e.g. "A.exe /B" and "A.exe /C". During the application installation, I created 3 shortcuts in Start | Programs, one launch A.exe,second launch "A.exe /B", and the last one launch "A.exe /C". Each of the shortcut has different icon to show the different options, although they are all launching A.exe. Let say the icon name are A.ico, B.ico and C.ico respectively. These 3 icons are in A.exe dll itself and I set the correct icon in InstallShield shortcut command. I also registered a file type .abc in registry, that it will have shell/open/command to launch A.exe if double click.

    In XP, when I launch either of the shortcut, the taskbar icon and program icon, remain the same which is A.ico. In Windows 7, when I used shortcut to launch A.exe, it works fine, both taskbar icon and program MainForm icon are A.ico. When I used shortcut to launch "A.exe /B", the taskbar icon changed to B.ico, but the program icon shown in MainForm remains A.ico. If I double click on xxx.abc (which will launch A.exe and read xxx.abc content), the taskbar icon is B.ico instead of A.ico. This is the same when I launch "A.exe /C", the taskbar icon is now C.ico, although MainForm remains A.ico. At this point, when I double click on xxx.abc, as you might have guess, the icon is C.ico. If I double click on A.exe, the taskbar icon is C.ico.

    I've spend effort troubleshoot to make sure A.ico is actually loaded in my program. B.ico and C.ico are used only in the shortcut. I also tried delete the icon cache but to no avail. It seems to me Windows 7 cache some application previous lunch information and reuse it on next application launch. But I found no clue to verify my thoughts.

    Appreciate if anyone has any clue on this. Before I forgot, I see this issue in both Windows 7 32 and 64-bits.

    Thank you.
     
  2. changmeikuan

    changmeikuan New Member

    Joined:
    Apr 6, 2010
    Messages:
    4
    Likes Received:
    0
    Hi,

    I found a way to simplify my queries. At Windows 7, create 3 program shortcuts which execute same executable. Then change icon for second shortcut and third shortcut. When we launch the executable from the second and third shortcut, the taskbar icon of the executable will be that of the shortcut icon instead of the executable MainForm icon. Is this the intended behaviour of Windows 7?

    Thank you.
     
  3. JPLAL

    JPLAL New Member

    Joined:
    Apr 2, 2010
    Messages:
    20
    Likes Received:
    0
    Did any body face issue with creating Modeless Dialog through "CreateDialog()" of c++ for the Windows 7 64 bit machine?
     

Share This Page

Loading...