Solved

Dialog Always On Top

Posted on 2004-08-05
2
309 Views
Last Modified: 2013-11-20
I am designing a Dialog application that is a test guide program to run while a user is doing the things instructed in the dialogs. Here is what I want. No matter what...I want this dialog to be in front of every window on the screen. The idea is that when the user goes to do something that the dialog instructs them to do...they can still read my dialog...it doesn't get lost behind the active window. Is there a way to do this???
0
Comment
Question by:SGyves
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 11728366
inside your dialog's OnInitDialog() function, write:

SetWindowPos(&CWnd::wndTopMost, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE);

If OnInitDialog() function does not exist, create it with Class Wizard.
0
 
LVL 86

Expert Comment

by:jkr
ID: 11728392
Alternatively, set the 'WS_EX_TOPMOST' style in the dialog's resources.
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

Title # Comments Views Activity
Generic progress indicator 6 113
List out all word 7 255
WinWaitActive parameters 12 31
abstract class with all non abstract mentods 6 76
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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