Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

always on top - how?

Status
Not open for further replies.

rpet

Programmer
Jun 5, 2000
87
DE
hello!<br><br>&nbsp;&nbsp;can someone tell me how to add an &quot;always on top&quot; feature to a windows application (using vc++ or vb)?<br><br>&nbsp;&nbsp;or is it possible to start an existing (already compiled) program (e.g. excel or whatever) so that it is always on top?<br><br>thanks in advance!<br>ralf<br>
 
Dear ralf,<br><br>To add that feature to your application do this to your main window, i.e., dialog or CFrameWnd derivation.<br><br>SetWindowPos( wndTopMost,....)<br><br>You will have to look at the documentation to see how you want to fill out the remaining parameters.<br><br>Also it is possible to send a message to other application that will set their position to wndTopMost but I can't remember how. If you do a search for 'SetWindowPos wndTopMost' on msdn you might find an article and sample that describes the technique.<br><br>Good luck<br>-pete<br>
 
Found some information on msdn!<br>Thank you Pete!<br><br>Ralf<br>
 
To make alwais on top, you need to add to style WS_POPUP. An existing application you can make alwais on top only if you are allowed to do it (COM interfaces, bla bla bla) [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top