Solved

Dialog Always On Top

Posted on 2004-08-05
2
308 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

12 Experts available now in Live!

Get 1:1 Help Now