flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
bzdashek 17 May 2012, 05:39
Has anyone tried to invoke the TaskDialog?
The API reference: http://msdn.microsoft.com/en-us/library/windows/desktop/bb760540(v=vs.85).aspx states that TaskDialog is exported by comctl32.dll, but I ran etl.exe on COMCTL32.DLL, and there was no such export (application also shows an error message). But the OS clearly shows that TaskDialogs. There's something in this world that I don't understand. The internets keep silence (searched MASM forums also). OS: Win7. Any ideas? Last edited by bzdashek on 18 May 2012, 05:19; edited 1 time in total |
|||
![]() |
|
revolution 17 May 2012, 06:44
Minimum supported client Windows Vista |
|||
![]() |
|
revolution 17 May 2012, 06:55
You probably need a manifest to access the extra functionality in COMCTL32.
|
|||
![]() |
|
bzdashek 17 May 2012, 12:48
Sorry, I get it.
But if that's a vista function then could someone please tell me how can I call a MessageBox of the new type, like that in an attached picture in Windows 7?
|
||||||||||
![]() |
|
typedef 18 May 2012, 00:03
Most of these are custom made dialogs.
![]() |
|||
![]() |
|
revolution 18 May 2012, 00:50
bzdashek wrote: But if that's a vista function then could someone please tell me how can I call a MessageBox of the new type, like that in an attached picture in Windows 7? Maybe this will work? Code: TD_WARNING_ICON = -1 TD_ERROR_ICON = -2 TD_INFORMATION_ICON = -3 TD_SHIELD_ICON = -4 TDCBF_OK_BUTTON = 1 TDCBF_YES_BUTTON = 2 TDCBF_NO_BUTTON = 4 TDCBF_CANCEL_BUTTON = 8 TDCBF_RETRY_BUTTON = $10 TDCBF_CLOSE_BUTTON = $20 format PE GUI 6.0 entry start include 'win32w.inc' section '.text' code readable executable start: invoke InitCommonControls invoke TaskDialog,HWND_DESKTOP,0,_title,_error,0,TDCBF_OK_BUTTON,0,0 invoke ExitProcess,0 section '.data' data readable writeable _class TCHAR 'FASMWIN32',0 _title TCHAR 'Win32 program template',0 _error TCHAR 'Startup failed.',0 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ comctl32,'COMCTL32.DLL' include 'api\kernel32.inc' include 'api\user32.inc' import comctl32,\ InitCommonControls,'InitCommonControls',\ TaskDialog,'TaskDialog' section '.rsrc' resource data readable directory 24,manifest resource manifest,\ 1, LANG_NEUTRAL, win7 resdata win7 db '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',13,10 db '<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">',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 '<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">',13,10 db '<application>',13,10 ; <!--The ID below indicates application support for Windows Vista --> ; db '<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>',13,10 ; <!--The ID below indicates application support for Windows 7 --> db '<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>',13,10 db '</application>',13,10 db '</compatibility>',13,10 db '</asmv1:assembly>' endres |
|||
![]() |
|
bzdashek 18 May 2012, 04:50
@revolution
Thank you very much, it works! That manifest thing is really pain in the @rse. |
|||
![]() |
|
bzdashek 18 May 2012, 05:12
It also works with this manifest:
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 It's strange, yesterday I also created the simple app like this (initcommoncontrols, taskdialog, exitprocess), but it crashed every time when i tried to run it. Must have messed with the parameter order. Pasted your call to TaskDialog to it and it worked. @typedef: Yesterday, while messing with TaskDialog, I managed to find all kind of stuff - from VB examples to Java, and in this whole bunch of stuff, there's also an example of creating custom TaskDialogs on CPP, I hope someone will also find it useful: http://msdn.microsoft.com/en-us/library/bb756938.aspx |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.