Solved

Dialog box problems with screen saver

Posted on 2001-06-11
7
281 Views
Last Modified: 2011-09-20
Hi,

I have an application that runs as a daemon service in window desktop. When the user left their desktop unattended, one of my written screen saver will pop up and when the user hit enter a password dialog box will come up for screensaver deactivation purpose.

Some issues are encountered,

1) The password dialog box is not a foreground window when it pop up, hence keystrokes cannot be captured. If I use the SetForeGroundWindow API, it is not reliable, sometimes user may accidentally hit the mouse and dialog went out of focus.

2) I try checking "System Modal" flag in the password dialog form, but it is not useful either.

3) Worst still, I have set the screensaver as the topmost form and yet Microsoft Outlook reminder message box can still pop on top of it causing some security issues.

Pls give me some suggestions on overcoming this problems. Thanks.

Fyi. The dialog box is created using the DialogBox(..., DlgProc). There is no CDialog class.
0
Comment
Question by:oohchild
7 Comments
 
LVL 5

Expert Comment

by:robpitt
ID: 6176525
[Note this is a windows topic question not a C++ question]

Assuming the dialog is created from your running screensaver process then I can't understand why there should be a problem.

Could you clarify what you mean by a 'daemon service'?

Also is this under NT?

Rob
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6176553
Try to call:
SetWindowPos(&(CWnd::wndTopMost), 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE)
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6176558
Or try this without CWnd class:
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:oohchild
ID: 6179668
Nope it is running in Win95. The dialog box is not created from the screen saver but from another application (say App B). App B invokes the screensaver when system idle time out. Suppose user hit enter screensaver, screensaver will post message to AppB to invoke the dialog box. The issue is this Dialog box is not on foreground window hence cannot accept password.  

Btw, is the SetWindowPos meant for the 3rd question?
0
 
LVL 11

Expert Comment

by:griessh
ID: 6814522
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points.

The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please do not accept this comment as an answer!
======
Werner
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 6833260
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6833298
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now