Solved

Dialog Always On Top

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

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

Suggested Solutions

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

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