Always on top

I have an SDI application.  I need to make the application stay "always on top".  I can do this with dialogs in an application, or the child windows of a MDI app.  This seems to be very similar to the Task Manager, always on top option.

Thanks in advance.
kev
SweetLeafAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
WynConnect With a Mentor Commented:
Call SetWindowPos() on which window you wanna it to be topmost with wndTopMost  as the first parameter...

Free to ask...
Regards
W.Yinan
0
 
WynCommented:
Or you can creat it by specifying WM_EX_TOPMOST attr...
0
 
WynCommented:
For the later,you'd use CreateEx()...
0
 
wytzeCommented:
m_pMainWnd->SetWindowPosition(HWND_TOPMOST,X,Y,width,heigth,Flags);

m_pMainWnd is global variable in every SDI application.
0
 
SweetLeafAuthor Commented:
This seems to work.

Thanks,
kev
0
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.

All Courses

From novice to tech pro — start learning today.