![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
From: "Declercq Dirk" <dirk.declercq.ddc (AT) telenet (DOT) 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 (AT) TK2MSFTNGP09 (DOT) phx.gbl Newsgroups: microsoft.public.dotnet.framework.sdk,microsoft.pu blic.dotnet.framework.wind |
|
NNTP-Posting-Host: d54c2d224.access.telenet.be 84.194.210.36 Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP0 |
|
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.windowsforms:812 05 |
|
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 ) |
#3
| |||
| |||
|
|
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/ar.../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 (AT) telenet (DOT) 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 (AT) TK2MSFTNGP09 (DOT) phx.gbl Newsgroups: microsoft.public.dotnet.framework.sdk,microsoft.pu blic.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!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP0 9.phx.gbl Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.windowsforms:812 05 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 ) |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |