RE: How to bring the 'CredUIPromptForCredentials dialog' to the foreground
From: Shawn Farkas [MS] (shawnfa_at_online.microsoft.com)
Date: 02/26/05
- Previous message: Shawn Farkas [MS]: "RE: Compile assembly in runtime and execute in sandbox"
- In reply to: Declercq Dirk: "How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Next in thread: Declercq Dirk: "Re: How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Reply: Declercq Dirk: "Re: How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 26 Feb 2005 01:47:59 GMT
This isn't my area of expertese, but you shouldn't be using the Desktop as
the parent window for a dialog. Raymond expands upon that here:
http://blogs.msdn.com/oldnewthing/archive/2004/02/24/79212.aspx
-Shawn
http://blogs.msdn.com/shawnfa
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Note:
For the benefit of the community-at-large, all responses to this message
are best directed to the newsgroup/thread from which they originated.
--------------------
> From: "Declercq Dirk" <dirk.declercq.ddc@telenet.be>
> Subject: How to bring the 'CredUIPromptForCredentials dialog' to the
foreground
> Date: Thu, 24 Feb 2005 22:27:40 +0100
> Lines: 27
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
> X-RFC2646: Format=Flowed; Original
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
> Message-ID: <uX1MterGFHA.3472@TK2MSFTNGP09.phx.gbl>
> Newsgroups:
microsoft.public.dotnet.framework.sdk,microsoft.public.dotnet.framework.wind
owsforms,microsoft.public.dotnet.security
> NNTP-Posting-Host: d54c2d224.access.telenet.be 84.194.210.36
> Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP0
9.phx.gbl
> Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.windowsforms:81205
microsoft.public.dotnet.security:9230
microsoft.public.dotnet.framework.sdk:10294
> X-Tomcat-NG: microsoft.public.dotnet.security
>
> 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 )
>
>
>
- Previous message: Shawn Farkas [MS]: "RE: Compile assembly in runtime and execute in sandbox"
- In reply to: Declercq Dirk: "How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Next in thread: Declercq Dirk: "Re: How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Reply: Declercq Dirk: "Re: How to bring the 'CredUIPromptForCredentials dialog' to the foreground"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|