Solved

Dialog box problems with screen saver

Posted on 2001-06-11
7
287 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

770 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