News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

list view items and icons

Started by ossama, November 28, 2007, 04:00:03 PM

Previous topic - Next topic

ossama

thank you Shantanu Gadgil, i will try your solution.

ossama

Shantanu Gadgil, i tried the manifest, but the problem keep, it does not solve my problem, any other idea?

ragdog

hi

here is your project with xp manifest


greets
ragdog

[attachment deleted by admin]

ossama

ragdog, thank you, it works  :U

ossama

Shantanu Gadgil thank you too for your help and your time

ossama

ragdog ,Shantanu Gadgil, i found my mistake,
i have written this line into my resource file:
1    RT_MANIFEST    "xp_manifest.xml"
i have look in windows.inc and i have found
RT_MANIFEST    equ  24
i think rc.exe does not have RT_MANIFEST equals to 24

ossama

in  the resource file we have
1   24    "xp_manifest.xml"
this means that the manifest is in the first place and it will be loaded automatically,
but if i want to make the manifest resource with other ID other than 1, what should i do in my source code, is there any functiuon to load this manifest?

Shantanu Gadgil

Finally home now ...

Quote from: ossama on November 30, 2007, 02:12:36 PM
i think rc.exe does not have RT_MANIFEST equals to 24
Correct ... if you write:
1 RT_MANIFEST "xpmanifest.xml"

you will need a
#define RT_MANIFEST 24
before !!!  :bg

Quote from: ossama on November 30, 2007, 02:15:49 PM
but if i want to make the manifest resource with other ID other than 1, what should i do in my source code, is there any functiuon to load this manifest?
I don't know the details of that ... why a different ID ?
Maybe "its supposed to be that way!"  :wink

Anyway ... all I did to your .rc file was add the following line:
1 24 "xpmanifest.xml"

Tried the #define thing and that worked fine too!

Regards,
Shantanu
To ret is human, to jmp divine!

ossama

Quote from: Shantanu Gadgil on November 30, 2007, 05:10:01 PM
I don't know the details of that ... why a different ID ?
Maybe "its supposed to be that way!"  :wink

some times i preserve the id=1 for other things and i write macros that use the id = 1,
so i need to put the manifest in other id

ossama

i found another way to use the manifest without using it in a resource file, the methode is to rename the manifest file as the following:
ExecutableFileName.exe.manifest
where ExecutableFileName is the file name of the executable that we want to assign a manifest to it.
thank you for your help and time

ossama

but i have a question , why we have to add a manifest to our project to make icons show correctly ? i mean why it does not show ok just by using the windows api that add icons to an image list and the function (messages) that show the icon in the control (toolbar,listview,maybe other controls) ?

Shantanu Gadgil

Quote from: ossama on December 01, 2007, 07:42:40 AM
but i have a question , why we have to add a manifest to our project to make icons show correctly ? i mean why it does not show ok just by using the windows api that add icons to an image list and the function (messages) that show the icon in the control (toolbar,listview,maybe other controls) ?

I think the manifest makes sure (?) that the program ends up using the correct version of the common controls; here v6.0.0.0 (from the xml file)

Again ... I am not sure about this, would be better you confirm this!

Quote from: ossama on November 30, 2007, 08:33:44 PM
i found another way to use the manifest without using it in a resource file, the methode is to rename the manifest file as the following:
ExecutableFileName.exe.manifest
where ExecutableFileName is the file name of the executable that we want to assign a manifest to it.
thank you for your help and time
Yes ... that method was to give the "new" XP-style look to the old programs, although that method didn't always work.
(I think, the program needed to have call to "InitCommonControls" in it, otherwise the program would just not start !!!  :dazzled: )

No matter what, I like a combined exe, rather that two separate file, so I like it as part of the resource.

Regards,
Shantanu
To ret is human, to jmp divine!

ossama

what i understand is that the common controls library with old version has a bug so that it does not show icons correctly, and when we use a manifest spesifying the version 6 it will correct the bug,
is it right?