flat assembler
Message board for the users of flat assembler.

Index > Windows > How to enable xp styles...


What is this?
Cool topic!
45%
 45%  [ 11 ]
This shit sucks huge one!
16%
 16%  [ 4 ]
I know this already!
37%
 37%  [ 9 ]
Total Votes : 24

Author
Thread Post new topic Reply to topic
mrn0b0dy



Joined: 18 Mar 2005
Posts: 1
mrn0b0dy 18 Mar 2005, 16:29
Razz This is the way you can enable xp styles support in your app...
Code:
directory       24,manifest
resource        manifest,\
                1,LANG_NEUTRAL,man
fileres         man,'man.txt'
    

This is man.txt:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    name="x.x.x"
    processorArchitecture="x86"
    version="5.1.0.0"
    type="win32"/>
<description>no</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="x86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>
    
Razz
Post 18 Mar 2005, 16:29
View user's profile Send private message Reply with quote
marciano



Joined: 27 Feb 2005
Posts: 18
Location: Argentina
marciano 19 Mar 2005, 01:34
With that code can I make the buttons to use the current XP style? That's great, I was looking for it Very Happy
Post 19 Mar 2005, 01:34
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 19 Mar 2005, 16:23
Thanks, I was trying to find how to do this... Smile
Post 19 Mar 2005, 16:23
View user's profile Send private message Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
S.T.A.S. 20 Mar 2005, 11:09
MSDN wrote:
To create a manifest and enable your application to use visual styles:
1. Link to ComCtl32.lib and call InitCommonControls (see the Platform SDK documentation in the MSDN Library).
2. Add a file called YourApp.exe.manifest to your source tree that has the following XML format: [..]
3. Add the manifest to your application's resource file as follows: [..]
RTFMSDN Very Happy
Post 20 Mar 2005, 11:09
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 16 Aug 2005, 19:31
By the way, the macro 'fileres' is missing from FASM 1.64, as far as I can tell. You'll have to copy it from an earlier version. I got it from v 1.61, its right here:
Code:
macro fileres label,file_name
 { local data,size
  label dd RVA data,size,0,0
  data = $
  file file_name
  size = $ - data
  align 4 }
    

Just copy it into INCLUDE\MACROS\RESOURCE.INC, and it'll work.

_________________
This calls for... Ultra CRUNCHY Man!
Ta da!! *crunch*
Post 16 Aug 2005, 19:31
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 16 Aug 2005, 19:40
It has been replaced with the more universal "resdata" macro, see the updated manual, here's the example taken directly from it:
Code:
resdata manifest
  file 'manifest.xml'
endres    


Since the resource macros were not documented earlier, I decided to improve some of the solutions before I finally documented them.
Post 16 Aug 2005, 19:40
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 17 Aug 2005, 00:14
Ok, thanks. I tend not to read manuals. hehe

Ok, so the updated code would be:
Code:
directory       24,manifest
resource        manifest,\
                1,LANG_NEUTRAL,man
resdata man
                file 'man.xml'
endres
    

I've tested this to work.

_________________
This calls for... Ultra CRUNCHY Man!
Ta da!! *crunch*
Post 17 Aug 2005, 00:14
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 17 Aug 2005, 09:33
UCM wrote:
Ok, thanks. I tend not to read manuals. hehe

Don't worry, it's actually quite common. Wink

It reminds me this book: http://www.joelonsoftware.com/uibook/chapters/fog0000000062.html
Joel Spolsky wrote:
Users Don't Read the Manual.
(...)
In fact, users don't read anything.
Post 17 Aug 2005, 09:33
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 17 Aug 2005, 13:04
Hey, I know that already! Wink I've read that before (it was linked to in some other topic).

Btw, a better way to code that now would probably be:
Code:
directory 24,manifest
resource manifest,\
         1,LANG_NEUTRAL,man
resdata man
         db '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',13,10
         db '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">',13,10
         db '<assemblyIdentity name="x.x.x" processorArchitecture="x86" version="5.1.0.0" type="win32"/> ',13,10
         db '<description>no</description>',13,10
         db '<dependency>',13,10
         db '<dependentAssembly>',13,10
         db '<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />',13,10
         db '</dependentAssembly>',13,10
         db '</dependency>',13,10
         db '</assembly>',13,10
endres
    

that would reduce the file clutter. Plus, a PE file hacker (or someone using Resource Hacker) would get more annoyed due to the long lines.

_________________
This calls for... Ultra CRUNCHY Man!
Ta da!! *crunch*
Post 17 Aug 2005, 13:04
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 18 Aug 2005, 06:12
hehe----nice article:D Tomasz
Post 18 Aug 2005, 06:12
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.