How to bring the 'CredUIPromptForCredentials dialog' to the foreground

From: Declercq Dirk (dirk.declercq.ddc_at_telenet.be)
Date: 02/24/05

  • Next message: gkelly: "Assembly loaded from URL needs to read registry - but can't"
    Date: Thu, 24 Feb 2005 22:27:40 +0100
    
    

    Hey,

    >From within my security-dll I am able to display the
    'CredUIPromptForCredentials' dialog.
    Because this dialog is popped up from code within my dll I have set the
    parent window of this dialog to be the Desktop.

    I am already able to bring this dialog visible (if there are other window's
    occupying the desktop) by using
    SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE ) in a
    seperate thread
    where the 'hWnd' parameter is the window I have found with the 'EnumWindows'
    function.

    What I am not able to do is set this window the active window of the system
    because when I press a key to fill
    in the UserName the input is going to another application although the
    title-bar of the 'CredUIPromptForCredentials'-dialog
    seems to be active (I suspect so because the color is the one of an active
    window).

    Some idea's ?

    I have already tried using SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0,
    SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW )


  • Next message: gkelly: "Assembly loaded from URL needs to read registry - but can't"

    Relevant Pages

    • Re: Threading problem with Garbage Collector
      ... It itself controls calls to a DLL ... "A"), it loads the DLL, which in turn then creates a window (it needs to, ... Disposemethod it uses the label window to synchronize the FreeLibrary ... delegate void DelegateKillDLL(); ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Simulating Control-Alt-Delete?
      ... Winlogon.exe window or not. ... all desktops and all top level windows. ... the WinLogon window didn't show. ... > Write this part of your test suite as a DLL, ...
      (microsoft.public.win32.programmer.kernel)
    • Re: VB6 runtime is supported on Windows 7
      ... The settings window was fairly extensive ... DLL and the settings are organized into a UDT rather ...
      (microsoft.public.vb.general.discussion)
    • Re: window from win32 dll
      ... handle of the DLL, according to the documentation. ... instance of the window to share the one-and-only DC that is a class DC? ... For example, you are presuming RegisterClassEx ... .HINSTANCE storing in dllmain HMODULE ...
      (microsoft.public.vc.mfc)
    • Re: Difference between WM_APP and WM_USER
      ... broadcasting or even 'broadcasting' such a message is outrageously ... DLL that uses WM_APP+7 as a message to a designated window. ... dll to use this message range. ...
      (microsoft.public.vc.mfc)