Solved

Dialog box problems with screen saver

Posted on 2001-06-11
7
297 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

730 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