?
Solved

Dialog box problems with screen saver

Posted on 2001-06-11
7
Medium Priority
?
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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