Jump to content

Recommended Posts

Posted
On 11/16/2018 at 7:47 PM, argumentum said:

In regards to _WinAPI_MessageBoxCheck(), the Microsoft info is not true.
at https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-shmessageboxchecka they say that the value will be stored at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\LowRegistry\DontShowMeThisDialogAgain
just as in AutoIt help file, but in my Win10 PC is stored at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain
even tho, the other one exists.

...just sharing.  

I'm sorry but I do not write in English 

I need to google translator 
I edited the original file _WinAPI_MessageBoxCheck()

I added a new value
$reset_regedit_key=false

why ?

if the example in the help file is used twice the function returns an error

Func _WinAPI_MessageBoxCheck($iType, $sTitle, $sText, $sRegVal, $iDefault = -1, $hParent = 0, $reset_regedit_key=false)
    dim $DontShowMeThisDialogAgain="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain"
    dim $DontShowMeThisDialogAgain_lowregistry="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\LowRegistry\DontShowMeThisDialogAgain" 
    if $reset_regedit_key=true Then
        if regread($DontShowMeThisDialogAgain,$sRegVal)<>"" then 
            RegDelete($DontShowMeThisDialogAgain,$sRegVal)
            If @error Then Return SetError(@error, @extended, -2)
        endif
        if RegDelete($DontShowMeThisDialogAgain_lowregistry,$sRegVal)<>"" then 
            RegDelete($DontShowMeThisDialogAgain_lowregistry,$sRegVal)
            If @error Then Return SetError(@error, @extended, -3)
        endif
    endif
    Local $aRet = DllCall('shlwapi.dll', 'int', 'SHMessageBoxCheckW', 'hwnd', $hParent, 'wstr', $sText, 'wstr', $sTitle, _
            'uint', $iType, 'int', $iDefault, 'wstr', $sRegVal)
    If @error Then Return SetError(@error, @extended, -1)

    Return $aRet[0]
EndFunc   ;==>_WinAPI_MessageBoxCheck

 

To community goes all my regards and thanks

Posted
4 hours ago, Jos said:

Split into a new topic as this has nothing to do with the FAQ in the helpfile topic.

sorry

To community goes all my regards and thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...