flat assembler
Message board for the users of flat assembler.

Index > Windows > How to get this new message box UI?

Author
Thread Post new topic Reply to topic
FlierMate1



Joined: 31 May 2022
Posts: 118
FlierMate1 09 Jun 2022, 12:30
The "MessageBoxA" or "MessageBoxW" Windows API that I call comes with somewhat older UI.


Description: Older version
Filesize: 11.74 KB
Viewed: 2814 Time(s)

older.png


Description: Newer version of message box UI
Filesize: 8.68 KB
Viewed: 2821 Time(s)

old.png


Post 09 Jun 2022, 12:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20456
Location: In your JS exploiting you and your system
revolution 09 Jun 2022, 13:18
You need a manifest in your exe to enable the newer window styles.

There are some old topics about it on this board.
Post 09 Jun 2022, 13:18
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20456
Location: In your JS exploiting you and your system
revolution 09 Jun 2022, 13:24
Post 09 Jun 2022, 13:24
View user's profile Send private message Visit poster's website Reply with quote
FlierMate1



Joined: 31 May 2022
Posts: 118
FlierMate1 09 Jun 2022, 13:45
Thank you!

Code:
format PE GUI 4.0
entry start

include 'win32a.inc'

section '.data' readable writable
       title       db 'FASM',0
       message     db 'Thank you Tomasz and revolution for making this possible!',0

section '.code' code readable writable executable

start:

       push 0x40
       push title
       push message
       push 0
       call [MessageBox]

       push eax
       call [ExitProcess]

section '.idata' import readable writable

       library kernel,'KERNEL32.DLL',\
               user,'USER32.DLL'

       import kernel,\
              ExitProcess,'ExitProcess'

       import user,\
              MessageBox,'MessageBoxA'


section '.rsrc' resource data readable

directory 24,manifest
resource  manifest,\
          1, LANG_NEUTRAL, winxp
resdata winxp
      ;  file 'manifest.xml'
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',13,10
    db 'version="1.0.0.0"',13,10
    db 'processorArchitecture="X86"',13,10
    db 'name="CompanyName.ProductName.Application"',13,10
    db 'type="win32"',13,10
db  '/>',13,10
db '<description>Your application description here.</description>',13,10
db '<dependency>',13,10
    db '<dependentAssembly>',13,10
        db '<assemblyIdentity',13,10
            db 'type="win32"',13,10
            db  'name="Microsoft.Windows.Common-Controls"',13,10
            db 'version="6.0.0.0"',13,10
            db 'processorArchitecture="X86"',13,10
            db 'publicKeyToken="6595b64144ccf1df"',13,10
            db 'language="*"',13,10
       db  '/>',13,10
    db '</dependentAssembly>',13,10
db '</dependency>',13,10
db '</assembly>'
endres    


Description:
Filesize: 16.08 KB
Viewed: 2805 Time(s)

MSGBOX.png


Post 09 Jun 2022, 13:45
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.