Solved

Dialog box problems with screen saver

Posted on 2001-06-11
7
270 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

757 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

22 Experts available now in Live!

Get 1:1 Help Now