make topmost dialog

Posted on 1999-07-03
Medium Priority
Last Modified: 2013-11-20
hi everybody
  I use vc++5  . In my program I would like to set my Dialog that  open from event idle time ( use DoModal() to open it ) to topmost . Actually when
I open dialog with DoModal() dialog will stay on topmost but when I open it from Idle time , it not stay on topmost . please advise me to do it.
thank you

Question by:eakkung
1 Comment

Accepted Solution

trestan earned 120 total points
ID: 1308737
Add a message handler for WM_CREATE in your dialog window and add the following under the handler:
      SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOREPOSITION|SWP_NOSIZE);

Then your dialog will stay on topmost.
I check your rate history and found that all are 'C' except one 'B'. I guess you never rate the answers others provided. I suggest you do that because it will benefit both other people and yourself also.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

607 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