Always on top.... how?
I''ve been writing a small media player.. just for myself to use (although I suppose I could put it up on my portfolio site when I''m done)
It runs pretty much perfect now (gonna change the gui, add some visual effects for sound playback e.t.c, maybe a few more options (such as clipping it to the right of the screen e.t.c).. but overall its done). There was just one more thing that I thought of while watching one of my music video''s with it a minute ago..... it''d be really cool if I could make it ALWAYS on top.. so it could sit in the top right of my screen (not much going on there) and play my music vids while I work on other things (or come here to post hehe).
I''ve written the program using DirectShow for most of the media playback. the gui''s all done in msvc++ 6.0... but now I''m stuck as to how to get it to make it "always on top"... so that no matter what i have open... they''re behind it.
Any help appreciated.
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
Look up SetWindowPos at msdn.microsoft.com - or if you have your copy of the win32 programmers reference guide to hand (If not, why not? You should get a copy with the win32 sdk) look it up in there.
-------- E y e .Scream Software --------
----------------------------------------
/-\
http://www.eyescream.cjb.net | * |
\-/
----------------------------------------
-------- E y e .Scream Software --------
----------------------------------------
/-\
http://www.eyescream.cjb.net | * |
\-/
----------------------------------------
Alternatively, use WS_EX_TOPMOST with CreateWindowEx.
---visit #directxdev on afternet <- not just for directx, despite the name
Cool stuff.... thanks a lot.
all i had to do was use SetWindowPos with HWND_TOPMOST as my hWndInsertAfter value... cool stuff.
Its up there.. in my top right corner, playing right now while I type this message..... very cool stuff.
Thanks again :D :D :D
~A very happy Cobra~
all i had to do was use SetWindowPos with HWND_TOPMOST as my hWndInsertAfter value... cool stuff.
Its up there.. in my top right corner, playing right now while I type this message..... very cool stuff.
Thanks again :D :D :D
~A very happy Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement